Migrator
migrateTo()
Signature
Section titled “Signature”migrateTo() — returns string
Available in: migrator
Category: General Functions
Description
Section titled “Description”Migrates the database schema to a specified version. This function is primarily intended for programmatic database migrations, but the recommended usage is via the CLI or Wheels GUI interface.
Parameters
Section titled “Parameters”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
version | string | no | — | The Database schema version to migrate to |
Examples
Section titled “Examples”// Migrate to a specific version
// Returns a message with the result
result=application.wheels.migrator.migrateTo(version);