From 54def9fe1767c56bb300eb7f1b8ce118a742d6b6 Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Thu, 3 May 2007 00:32:45 +0000 Subject: [PATCH] Run our Rename and Retype migrations after the default migrations so that we don't freak out if a field is added, then renamed or retyped all in the same migration. Now the column will be added with its proper name by the default migrations and then the Rename migration will not freak out and the Retype migration will NOOP. --- src/java/com/samskivert/jdbc/depot/EntityMigration.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/java/com/samskivert/jdbc/depot/EntityMigration.java b/src/java/com/samskivert/jdbc/depot/EntityMigration.java index 7b5270b..ba317ca 100644 --- a/src/java/com/samskivert/jdbc/depot/EntityMigration.java +++ b/src/java/com/samskivert/jdbc/depot/EntityMigration.java @@ -108,6 +108,10 @@ public abstract class EntityMigration extends Modifier } } + public boolean runBeforeDefault () { + return false; + } + protected void init (String tableName, HashMap marshallers) { super.init(tableName, marshallers); _newColumnDef = marshallers.get(_newColumnName).getColumnDefinition(); @@ -137,6 +141,10 @@ public abstract class EntityMigration extends Modifier } } + public boolean runBeforeDefault () { + return false; + } + protected void init (String tableName, HashMap marshallers) { super.init(tableName, marshallers); _newColumnDef = marshallers.get(_columnName).getColumnDefinition();