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.
This commit is contained in:
Michael Bayne
2007-05-03 00:32:45 +00:00
parent 55c4764192
commit 54def9fe17
@@ -108,6 +108,10 @@ public abstract class EntityMigration extends Modifier
} }
} }
public boolean runBeforeDefault () {
return false;
}
protected void init (String tableName, HashMap<String,FieldMarshaller> marshallers) { protected void init (String tableName, HashMap<String,FieldMarshaller> marshallers) {
super.init(tableName, marshallers); super.init(tableName, marshallers);
_newColumnDef = marshallers.get(_newColumnName).getColumnDefinition(); _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<String,FieldMarshaller> marshallers) { protected void init (String tableName, HashMap<String,FieldMarshaller> marshallers) {
super.init(tableName, marshallers); super.init(tableName, marshallers);
_newColumnDef = marshallers.get(_columnName).getColumnDefinition(); _newColumnDef = marshallers.get(_columnName).getColumnDefinition();