er.extensions.migration
Class ERXMigrationDatabase.Migration
java.lang.Object
er.extensions.migration.ERXMigrationDatabase.Migration
- All Implemented Interfaces:
- IERXMigration
- Direct Known Subclasses:
- ERAttachment0, ERAttachment1, ERAttachmentMigration, ERCoreBusinessLogic0, ERTaggable0, ERTaggableEntity0, ERXTest0
- Enclosing class:
- ERXMigrationDatabase
public abstract static class ERXMigrationDatabase.Migration
- extends Object
- implements IERXMigration
A convenience implementation of IERXMigration that passes in an
ERXMigrationDatabase instead of channel + model.
- Author:
- mschrag
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ALLOWS_NULL
public static final boolean ALLOWS_NULL
- See Also:
- Constant Field Values
NOT_NULL
public static final boolean NOT_NULL
- See Also:
- Constant Field Values
ERXMigrationDatabase.Migration
protected ERXMigrationDatabase.Migration()
ERXMigrationDatabase.Migration
protected ERXMigrationDatabase.Migration(NSArray languages)
languages
public NSArray<String> languages()
downgrade
public void downgrade(EOEditingContext editingContext,
EOAdaptorChannel channel,
EOModel model)
throws Throwable
- Description copied from interface:
IERXMigration
- Called when migrating the database from the next version to this version. For instance if this is AuthModel1, it
will be called to migrate from version 1 back to version 0.
If this is the lowest migration you support, downgrade should throw an ERXMigrationFailedException.
- Specified by:
downgrade in interface IERXMigration
- Parameters:
editingContext - the editing context you can perform EO operations with.channel - the channel to perform low level operations withmodel - the model being downgraded
- Throws:
Throwable - if something fails
downgrade
public abstract void downgrade(EOEditingContext editingContext,
ERXMigrationDatabase database)
throws Throwable
- Parameters:
editingContext - the editing contextdatabase - the migration database
- Throws:
Throwable - if anything goes wrong- See Also:
IERXMigration.downgrade
modelDependencies
public NSArray<ERXModelVersion> modelDependencies()
- Overridden to return null by default
- Specified by:
modelDependencies in interface IERXMigration
- Returns:
- an array of model versions that this migration depends on
upgrade
public void upgrade(EOEditingContext editingContext,
EOAdaptorChannel channel,
EOModel model)
throws Throwable
- Description copied from interface:
IERXMigration
- Called when migrating the database from the last version to this version. For instance if this is AuthModel1, it
will be called to migrate from version 0 to version 1.
- Specified by:
upgrade in interface IERXMigration
- Parameters:
editingContext - the editing context you can perform EO operations with.channel - the channel to perform low level operations withmodel - the model being upgraded
- Throws:
Throwable - if something fails
upgrade
public abstract void upgrade(EOEditingContext editingContext,
ERXMigrationDatabase database)
throws Throwable
- Parameters:
editingContext - the editing contextdatabase - the migration database
- Throws:
Throwable - if anything goes wrong- See Also:
IERXMigration.upgrade
Copyright © 2002 – 2007 Project Wonder.