Explorar el Código

disable migration when creating db for the first time

tags/2.0.1
Jonathan Cobb hace 4 años
padre
commit
8c648735d9
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. +2
    -1
      wizard-server/src/main/java/org/cobbzilla/wizard/server/listener/SystemInitializerListener.java

+ 2
- 1
wizard-server/src/main/java/org/cobbzilla/wizard/server/listener/SystemInitializerListener.java Ver fichero

@@ -86,8 +86,9 @@ public class SystemInitializerListener extends RestServerLifecycleListenerBase {
execScript("createdb --encoding=UTF-8 "+db);
if (!dbExists(db)) die(PREFIX+"error creating "+db+" database");

// create the schema, just this time
// create the schema, just this time. Disable migration.
config.getDatabase().getHibernate().setHbm2ddlAuto("create");
config.getDatabase().setMigrationEnabled(false);

} else {
log.info(db+" DB exists, not creating");


Cargando…
Cancelar
Guardar