Configuration
getAvailableMigrations()
Signature
Section titled “Signature”getAvailableMigrations() — returns array
Available in: migrator
Category: Database Migrations
Description
Section titled “Description”Searches db/migrate folder for migrations. 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 |
|---|---|---|---|---|
path | string | no | [runtime expression] | Path to Migration Files: defaults to /migrator/migrations/ |
Examples
Section titled “Examples”// Get array of available migrations
migrations = application.wheels.migrator.getAvailableMigrations();
if(ArrayLen(migrations)){
latestVersion = migrations[ArrayLen(migrations)].version;
} else {
latestVersion = 0;
}