Oops, we need to replicate what Depot does elsewhere to construct a database-unique identifier for the index.

This commit is contained in:
Par Winzell
2009-01-23 15:17:51 +00:00
parent c654606a2d
commit 07d848a3a0
@@ -221,14 +221,14 @@ public abstract class SchemaMigration extends Modifier
@Override @Override
protected int invoke (Connection conn, DatabaseLiaison liaison) throws SQLException { protected int invoke (Connection conn, DatabaseLiaison liaison) throws SQLException {
if (!liaison.tableContainsIndex(conn, _tableName, _ixName)) { String fullIxName = _tableName + "_" + _ixName;
if (!liaison.tableContainsIndex(conn, _tableName, fullIxName)) {
// we'll accept this inconsistency // we'll accept this inconsistency
log.warning(_tableName + " index '" + _ixName + "' does not exist."); log.warning("No index '" + fullIxName + "' found on " + _tableName);
return 0; return 0;
} }
log.info("Dropping index '" + fullIxName + "' from " + _tableName);
log.info("Dropping index '" + _ixName + "' from " + _tableName); liaison.dropIndex(conn, _tableName, fullIxName);
liaison.dropIndex(conn, _tableName, _ixName);
return 1; return 1;
} }