Tidied up SQL execution in liaisons; fixed MySQL column renaming.

This commit is contained in:
Michael Bayne
2007-08-14 01:11:09 +00:00
parent 3a99decfce
commit 9edfe28d33
@@ -92,14 +92,20 @@ public abstract class EntityMigration extends Modifier
log.info("Renaming '" + _oldColumnName + "' to '" + _newColumnName + "' in: " + log.info("Renaming '" + _oldColumnName + "' to '" + _newColumnName + "' in: " +
_tableName); _tableName);
return liaison.renameColumn(conn, _tableName, _oldColumnName, _newColumnName) ? 1 : 0; return liaison.renameColumn(
conn, _tableName, _oldColumnName, _newColumnName, _newColumnDef) ? 1 : 0;
} }
public boolean runBeforeDefault () { public boolean runBeforeDefault () {
return true; return true;
} }
protected String _oldColumnName, _newColumnName; protected void init (String tableName, Map<String,FieldMarshaller> marshallers) {
super.init(tableName, marshallers);
_newColumnDef = marshallers.get(_newColumnName).getColumnDefinition();
}
protected String _oldColumnName, _newColumnName, _newColumnDef;
} }
/** /**