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:
@@ -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();
|
||||||
|
|||||||
Reference in New Issue
Block a user