From 07d848a3a0f6cf0326ee06eb1f6522c2cc7af7e4 Mon Sep 17 00:00:00 2001 From: Par Winzell Date: Fri, 23 Jan 2009 15:17:51 +0000 Subject: [PATCH] Oops, we need to replicate what Depot does elsewhere to construct a database-unique identifier for the index. --- src/java/com/samskivert/depot/SchemaMigration.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/java/com/samskivert/depot/SchemaMigration.java b/src/java/com/samskivert/depot/SchemaMigration.java index fa68475..39df2e4 100644 --- a/src/java/com/samskivert/depot/SchemaMigration.java +++ b/src/java/com/samskivert/depot/SchemaMigration.java @@ -221,14 +221,14 @@ public abstract class SchemaMigration extends Modifier @Override 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 - log.warning(_tableName + " index '" + _ixName + "' does not exist."); + log.warning("No index '" + fullIxName + "' found on " + _tableName); return 0; } - - log.info("Dropping index '" + _ixName + "' from " + _tableName); - liaison.dropIndex(conn, _tableName, _ixName); + log.info("Dropping index '" + fullIxName + "' from " + _tableName); + liaison.dropIndex(conn, _tableName, fullIxName); return 1; }