Skip to content

Migrator

createMigration()

createMigration() — returns string

Available in: migrator Category: General Functions

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

NameTypeRequiredDefaultDescription
migrationNamestringyes
templateNamestringno
migrationPrefixstringnotimestamp
// 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");