Migrator
createMigration()
Signature
Section titled “Signature”createMigration() — returns string
Available in: migrator
Category: General Functions
Description
Section titled “Description”Creates a migration file. Whilst you can use this in your application, the recommended useage is via either the CLI or the provided GUI interface
Parameters
Section titled “Parameters”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
migrationName | string | yes | — | |
templateName | string | no | — | |
migrationPrefix | string | no | timestamp |
Examples
Section titled “Examples”// Create an empty migration file
result=application.wheels.migrator.createMigration("MyMigrationFile");
// Or Create a migration file from the create-table template
result=application.wheels.migrator.createMigration("MyMigrationFile","create-table");