forked from Coded/SIPRP
git-svn-id: https://svn.coded.pt/svn/SIPRP@665 bb69d46d-e84e-40c8-a05a-06db0d633741
parent
6bbd8264d8
commit
39c1e8de58
@ -0,0 +1,62 @@
|
||||
/*
|
||||
* V8_12_To_V8_3.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.utils.Singleton;
|
||||
import com.evolute.utils.db.DBManager;
|
||||
import com.evolute.utils.db.Executer;
|
||||
import com.evolute.utils.sql.Assignment;
|
||||
import com.evolute.utils.sql.Field;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author tsimao
|
||||
*
|
||||
*/
|
||||
public class V8_5_To_V8_6 implements siprp.update.Update
|
||||
{
|
||||
public V8_5_To_V8_6()
|
||||
{
|
||||
}
|
||||
|
||||
public String[] listChanges()
|
||||
{
|
||||
return new String[] {
|
||||
"Adicionado campo 'activo' a TrabalhadoresProcesso\n"+
|
||||
"Adicionada observacao a Prestadores\n"+
|
||||
"Adicionado BI a Trabalhadores\n"
|
||||
};
|
||||
}
|
||||
|
||||
public double getStartVersion()
|
||||
{
|
||||
return 8.5;
|
||||
}
|
||||
|
||||
public double getEndVersion()
|
||||
{
|
||||
return 8.6;
|
||||
}
|
||||
|
||||
public void doUpdate() throws Exception
|
||||
{
|
||||
DBManager dbm = (DBManager) Singleton.getInstance( Singleton.DEFAULT_DBMANAGER );
|
||||
Executer executer = dbm.getSharedExecuter();
|
||||
com.evolute.utils.sql.Update update = new com.evolute.utils.sql.Update( "ALTER TABLE trabalhadores_processo ADD COLUMN activo char default 'y';"
|
||||
+ "ALTER TABLE prestadores ADD COLUMN observacoes character varying(65535);"
|
||||
+ "ALTER TABLE trabalhadores ADD COLUMN bi character varying(255);");
|
||||
executer.executeQuery( update );
|
||||
}
|
||||
|
||||
public String toString()
|
||||
{
|
||||
return "v" + getStartVersion() + " para v" + getEndVersion();
|
||||
}
|
||||
}
|
||||
Loading…
Reference in new issue