From b2ffa3dc3350b5bb7d0eb8bdb05015ed17ad418d Mon Sep 17 00:00:00 2001 From: mdb 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. git-svn-id: https://samskivert.googlecode.com/svn/trunk@2098 6335cc39-0255-0410-8fd6-9bcaacd3b74c --- 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 7b5270be..ba317ca6 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();