/** * Drops the current schema, emptying the database */ public static void dropSchema() { if (log.isDebugEnabled()) log.debug("Droping schema"); SchemaExport se = newSchemaExport(); se.drop(false, true); }
/** * Drops the current schema, emptying the database */ public static void dropSchema() { if (log.isDebugEnabled()) log.debug("Droping schema"); SchemaExport se = newSchemaExport(); se.drop(false, true); }
/** * Creates a schema * @param initializeDatabase If false, do not initialize the database (e.g. don't create Institution) */ public static void createSchema(boolean initializeDatabase) { if (log.isDebugEnabled()) log.debug("Creating schema"); SchemaExport se = newSchemaExport(); se.create(false, true); if (initializeDatabase) { if (log.isDebugEnabled()) log.debug("Initializing database"); IntactInitializer initializer = (IntactInitializer) IntactContext.getCurrentInstance() .getSpringContext().getBean("intactInitializer"); try { initializer.init(); } catch (Exception e) { throw new IntactException("Problem re-initializing core", e); } } }
/** * Creates a schema * @param initializeDatabase If false, do not initialize the database (e.g. don't create Institution) */ public static void createSchema(boolean initializeDatabase) { if (log.isDebugEnabled()) log.debug("Creating schema"); SchemaExport se = newSchemaExport(); se.create(false, true); if (initializeDatabase) { if (log.isDebugEnabled()) log.debug("Initializing database"); IntactInitializer initializer = (IntactInitializer) IntactContext.getCurrentInstance() .getSpringContext().getBean("intactInitializer"); try { initializer.init(); } catch (Exception e) { throw new IntactException("Problem re-initializing core", e); } } }