Tidied up SQL execution in liaisons; fixed MySQL column renaming.
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user