This commit is contained in:
@@ -680,6 +680,7 @@ public class DepotMarshaller<T extends PersistentRecord>
|
|||||||
for (EntityMigration migration : _migrations) {
|
for (EntityMigration migration : _migrations) {
|
||||||
if (migration.runBeforeDefault() &&
|
if (migration.runBeforeDefault() &&
|
||||||
migration.shouldRunMigration(currentVersion, _schemaVersion)) {
|
migration.shouldRunMigration(currentVersion, _schemaVersion)) {
|
||||||
|
migration.init(getTableName(), _fields);
|
||||||
ctx.invoke(migration);
|
ctx.invoke(migration);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -119,7 +119,9 @@ public abstract class EntityMigration extends Modifier
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* This is called to provide the migration with the name of the entity table and access to its
|
* This is called to provide the migration with the name of the entity table and access to its
|
||||||
* field marshallers prior to being invoked.
|
* field marshallers prior to being invoked. This will <em>only</em> be called after this
|
||||||
|
* migration has been determined to be runnable so one cannot rely on this method having been
|
||||||
|
* called in {@link #shouldRunMigration}.
|
||||||
*/
|
*/
|
||||||
protected void init (String tableName, HashMap<String,FieldMarshaller> marshallers)
|
protected void init (String tableName, HashMap<String,FieldMarshaller> marshallers)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user