/*
 * V8_0_To_V8_1.java
 *
 * Created on December 19, 2007, 3:12 PM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package siprp.update.updates;

import com.evolute.module.updater.AbstractUpdate;

/**
 *
 * @author fpalma
 */
public class V8_0_To_V8_1 extends AbstractUpdate
{
	
	public V8_0_To_V8_1()
	{
		super(8.0,8.1,"Alterar tabela dos ecds");
	}
	
	@Override
	public void doUpdate() throws Exception
	{
		com.evolute.utils.sql.Update update = 
				new com.evolute.utils.sql.Update( 
					"CREATE SEQUENCE trabalhadores_ecd_id_seq;" );
		getExecuter().executeQuery( update );
		update = 
			new com.evolute.utils.sql.Update( 
				"ALTER TABLE trabalhadores_ecd ALTER COLUMN id SET DEFAULT NEXTVAL('trabalhadores_ecd_id_seq');" );
		getExecuter().executeQuery( update );
	}
	
}
