forked from Coded/SIPRP
git-svn-id: https://svn.coded.pt/svn/SIPRP@914 bb69d46d-e84e-40c8-a05a-06db0d633741
parent
950fb35d19
commit
02b1352ad6
@ -0,0 +1,48 @@
|
||||
package siprp.update.updates;
|
||||
|
||||
import com.evolute.utils.Singleton;
|
||||
import com.evolute.utils.db.DBManager;
|
||||
import com.evolute.utils.db.Executer;
|
||||
|
||||
public class V10_3_To_V10_4
|
||||
implements siprp.update.Update
|
||||
{
|
||||
|
||||
public V10_3_To_V10_4()
|
||||
{
|
||||
}
|
||||
|
||||
public String []listChanges()
|
||||
{
|
||||
return new String[]{
|
||||
"adicionado campo a empresa (Imprimir tabela alargada)"
|
||||
};
|
||||
}
|
||||
|
||||
public double getStartVersion()
|
||||
{
|
||||
return 10.3;
|
||||
}
|
||||
|
||||
public double getEndVersion()
|
||||
{
|
||||
return 10.4;
|
||||
}
|
||||
|
||||
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 empresas add column imprimir_tabela_alargada boolean;"
|
||||
);
|
||||
executer.executeQuery( update );
|
||||
}
|
||||
|
||||
public String toString()
|
||||
{
|
||||
return "v" + getStartVersion() + " para v" + getEndVersion();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,18 @@
|
||||
package siprp.database.cayenne.objects;
|
||||
|
||||
import siprp.database.cayenne.objects.auto._SIPRPMap;
|
||||
|
||||
public class SIPRPMap extends _SIPRPMap {
|
||||
|
||||
private static SIPRPMap instance;
|
||||
|
||||
private SIPRPMap() {}
|
||||
|
||||
public static SIPRPMap getInstance() {
|
||||
if(instance == null) {
|
||||
instance = new SIPRPMap();
|
||||
}
|
||||
|
||||
return instance;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,12 @@
|
||||
package siprp.database.cayenne.objects.auto;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* This class was generated by Cayenne.
|
||||
* It is probably a good idea to avoid changing this class manually,
|
||||
* since it may be overwritten next time code is regenerated.
|
||||
* If you need to make any customizations, please use subclass.
|
||||
*/
|
||||
public class _SIPRPMap {
|
||||
}
|
||||
Loading…
Reference in new issue