/** * Drop the table constraints from the database. */ public void dropConstraints(DatabaseSession session, SchemaManager schemaManager, boolean build) { buildConstraints(schemaManager, build); for (TableDefinition table : getTableDefinitions()) { try { schemaManager.dropConstraints(table); } catch (DatabaseException exception) { //ignore } } }
/** * Drop the table constraints from the database. */ public void dropConstraints(DatabaseSession session, SchemaManager schemaManager, boolean build) { buildConstraints(schemaManager, build); for (TableDefinition table : getTableDefinitions()) { try { schemaManager.dropConstraints(table); } catch (DatabaseException exception) { //ignore } } }
protected void extendTablesAndConstraints(SchemaManager schemaManager, DatabaseSession session) { buildConstraints(schemaManager, true); boolean ignore = shouldIgnoreDatabaseException(); setIgnoreDatabaseException(true); try { extendTables(session, schemaManager, false); } finally { setIgnoreDatabaseException(ignore); } }
protected void extendTablesAndConstraints(SchemaManager schemaManager, DatabaseSession session) { buildConstraints(schemaManager, true); boolean ignore = shouldIgnoreDatabaseException(); setIgnoreDatabaseException(true); try { extendTables(session, schemaManager, false); } finally { setIgnoreDatabaseException(ignore); } }
protected void replaceTablesAndConstraints(SchemaManager schemaManager, DatabaseSession session, boolean createSequenceTables, boolean createSequences) { buildConstraints(schemaManager, true); boolean ignore = shouldIgnoreDatabaseException(); setIgnoreDatabaseException(true); try { dropTables(session, schemaManager, false); } finally { setIgnoreDatabaseException(ignore); } createTables(session, schemaManager, false, false, createSequenceTables, createSequences); }
protected void replaceTablesAndConstraints(SchemaManager schemaManager, DatabaseSession session, boolean createSequenceTables, boolean createSequences) { buildConstraints(schemaManager, true); boolean ignore = shouldIgnoreDatabaseException(); setIgnoreDatabaseException(true); try { dropTables(session, schemaManager, false); } finally { setIgnoreDatabaseException(ignore); } createTables(session, schemaManager, false, false, createSequenceTables, createSequences); }
/** * Create constraints. */ public void createConstraints(List<TableDefinition> tables, DatabaseSession session, SchemaManager schemaManager, boolean build) { buildConstraints(schemaManager, build); // Unique constraints should be generated before foreign key constraints, // because foreign key constraints can reference unique constraints for (TableDefinition table : tables) { try { schemaManager.createUniqueConstraints(table); } catch (DatabaseException ex) { if (!shouldIgnoreDatabaseException()) { throw ex; } } } for (TableDefinition table : tables) { try { schemaManager.createForeignConstraints(table); } catch (DatabaseException ex) { if (!shouldIgnoreDatabaseException()) { throw ex; } } } }
/** * Create constraints. */ public void createConstraints(List<TableDefinition> tables, DatabaseSession session, SchemaManager schemaManager, boolean build) { buildConstraints(schemaManager, build); // Unique constraints should be generated before foreign key constraints, // because foreign key constraints can reference unique constraints for (TableDefinition table : tables) { try { schemaManager.createUniqueConstraints(table); } catch (DatabaseException ex) { if (!shouldIgnoreDatabaseException()) { throw ex; } } } for (TableDefinition table : tables) { try { schemaManager.createForeignConstraints(table); } catch (DatabaseException ex) { if (!shouldIgnoreDatabaseException()) { throw ex; } } } }
buildConstraints(schemaManager, build);
buildConstraints(schemaManager, build);
buildConstraints(schemaManager, build);
buildConstraints(schemaManager, build);
buildConstraints(schemaManager, build);
buildConstraints(schemaManager, build);