From ad26c89af2fe44601f50d295881bfdea0d476043 Mon Sep 17 00:00:00 2001 From: mdb Date: Tue, 2 Jan 2007 22:12:05 +0000 Subject: [PATCH] Don't auto-remove indices either. Deciphering whether that's the right thing to do is a PITA and not really worth the trouble. git-svn-id: https://samskivert.googlecode.com/svn/trunk@2025 6335cc39-0255-0410-8fd6-9bcaacd3b74c --- .../com/samskivert/jdbc/depot/DepotMarshaller.java | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/java/com/samskivert/jdbc/depot/DepotMarshaller.java b/src/java/com/samskivert/jdbc/depot/DepotMarshaller.java index f2091c3f..b710d54a 100644 --- a/src/java/com/samskivert/jdbc/depot/DepotMarshaller.java +++ b/src/java/com/samskivert/jdbc/depot/DepotMarshaller.java @@ -714,15 +714,12 @@ public class DepotMarshaller ctx.invoke(new Modifier.Simple(indexdef)); } - // we do not hand remove columns but rather require that EntityMigration.Drop records be + // we do not auto-remove columns but rather require that EntityMigration.Drop records be // registered by hand to avoid accidentally causin the loss of data - // remove any extra indices - for (String index : indices) { - log.info("Dropping old index '" + index + "' from " + getTableName()); - String query = "alter table " + getTableName() + " drop index " + index; - ctx.invoke(new Modifier.Simple(query)); - } + // we don't auto-remove indices either because we'd have to sort out the potentially + // complex origins of an index (which might be because of a @Unique column or maybe the + // index was hand defined in a @Column clause) // run our post-default-migrations for (EntityMigration migration : _migrations) {