forked from Coded/SIPRP
git-svn-id: https://svn.coded.pt/svn/SIPRP@938 bb69d46d-e84e-40c8-a05a-06db0d633741
parent
249682fd87
commit
347bcd65ac
@ -0,0 +1,51 @@
|
|||||||
|
package siprp.update.updates;
|
||||||
|
|
||||||
|
import siprp.higiene.gestao.importacao.Importador;
|
||||||
|
|
||||||
|
import com.evolute.utils.Singleton;
|
||||||
|
import com.evolute.utils.db.DBManager;
|
||||||
|
import com.evolute.utils.db.Executer;
|
||||||
|
|
||||||
|
public class V10_5_To_V10_6
|
||||||
|
implements siprp.update.Update
|
||||||
|
{
|
||||||
|
|
||||||
|
public V10_5_To_V10_6()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public String []listChanges()
|
||||||
|
{
|
||||||
|
return new String[]{
|
||||||
|
"Importa\u00e7\u00e3o de riscos e medidas"
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
public double getStartVersion()
|
||||||
|
{
|
||||||
|
return 10.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
public double getEndVersion()
|
||||||
|
{
|
||||||
|
return 10.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 hs_medida alter column description type character varying(8192);");
|
||||||
|
executer.executeQuery( update );
|
||||||
|
update = new com.evolute.utils.sql.Update( "alter table hs_medida alter column requesitos_legais type character varying(8192);");
|
||||||
|
executer.executeQuery( update );
|
||||||
|
new Importador( executer ).importar();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String toString()
|
||||||
|
{
|
||||||
|
return "v" + getStartVersion() + " para v" + getEndVersion();
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in new issue