Skip to content

Migrator

migrateTo()

migrateTo() — returns string

Available in: migrator Category: General Functions

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.

NameTypeRequiredDefaultDescription
versionstringnoThe Database schema version to migrate to
// Migrate to a specific version
// Returns a message with the result
result=application.wheels.migrator.migrateTo(version);