If you need to modify a migration, then use ‘migration generate’ to create the initial migration plan. Then copy the steps into a text file, where you can edit the migration steps.
To run the new migration plan, use “migration run path” where path is the path to your text file.
The text file has a set of migration steps, one per line. Any line beginning with “#” is a comment line and is ignored. Blank lines are ignored.
|Creates a database table called typeName that represents that Delia type.
|Deletes a database table called typeName because it is no longer a Delia type that you need.
|rename-table oldTypeName newTypeName
|Renames a database table from oldTypeName to newTypeName, because the equivalent Delia type has been renamed.
|rename-table Customer Customers
|Alter the database table typeName to add a field called fieldName.
|Alter the database table typeName to delete a field called fieldName.
|rename-field typeName.oldFieldName newFieldName
|Renames a field in database table typeName from oldFieldName to newFieldName, because the equivalent Delia field has been renamed.
|rename-field Customer.firstName fName
|Alter the attributes of field fieldName in database table typeName. The equivalent Delia field has changed its modifiers. For example if the field has been modified to add an “optional” field modifier.
Example: Here is a sample migration file that adds two fields to Customer and creates a UserProfile table.
Note that the migration file does not need to specify details about the schema changes, since the Delia types already contain all the informatin needed for generating the database schema.
# this is a comment