Inherited by Movies0.

Public Member Functions | |
| void | downgrade (EOEditingContext editingContext, EOAdaptorChannel channel, EOModel model) throws Throwable |
| ERXMigration () | |
| ERXMigration (boolean useDatabaseSpecificMigrations) | |
| NSArray< ERXModelVersion > | modelDependencies () |
| void | upgrade (EOEditingContext editingContext, EOAdaptorChannel channel, EOModel model) throws Throwable |
Protected Member Functions | |
| String | getSQLForMigration (String migrationName) |
| String | migrationBundleName () |
| boolean | useDatabaseSpecificMigrations () |
Private Attributes | |
| Boolean | _useDatabaseSpecificMigrations |
| Logger | log = Logger.getLogger(ERXMigration.class.getName()) |
This makes migrations easier as you only have to create a new Java class according to the migration naming conventions, inherit from this class and put your SQL in a properly named text file (or more than one file, if you use database specific migrations).
If you need database specific migrations use
er.extensions.migration.ERXMigration.useDatabaseSpecificMigrations=true
in your Properties. The default is not to use database specific migrations. A filename for a database specific migration is then for example
ClassnameX_FrontBase_Upgrade.migration or
ClassnameX_Postgresql_Upgrade.migration
For the database specific part of the filename, the databaseProductName as from the JDBC adaptor is used. So make sure, you're using the correct filename. The migration will throw an exception if the appropriate migration textfile can't be found.
| ERXMigration | ( | boolean | useDatabaseSpecificMigrations | ) |
Override the global application preference on per-database migrations.
| useDatabaseSpecificMigrations | if true, database-specific migrations will be used |
| ERXMigration | ( | ) |
| void downgrade | ( | EOEditingContext | editingContext, | |
| EOAdaptorChannel | channel, | |||
| EOModel | model | |||
| ) | throws Throwable |
Checks for a corresponding downgrade file which is performed as a raw SQL action
Implements IERXMigration.
Checks in the current bundle for migration files corresponding to this classes name
| migrationName |
| String migrationBundleName | ( | ) | [protected] |
The name to create the NSBundle for the current bundle, defaults to the bundle that contains the migration class.
| NSArray<ERXModelVersion> modelDependencies | ( | ) |
No dependencies
Implements IERXMigration.
| void upgrade | ( | EOEditingContext | editingContext, | |
| EOAdaptorChannel | channel, | |||
| EOModel | model | |||
| ) | throws Throwable |
Checks for a corresponding upgrade file which is performed as a raw SQL action
Implements IERXMigration.
| boolean useDatabaseSpecificMigrations | ( | ) | [protected] |
Boolean _useDatabaseSpecificMigrations [private] |
Logger log = Logger.getLogger(ERXMigration.class.getName()) [private] |
Logging support
1.5.8