Return to v2.0 docs

getAvailableMigrations()


Configuration Database Migrations array migrator


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

Name Type Required Default Description
path string No [runtime expression] Path to Migration Files: defaults to /migrator/migrations/
// Get array of available migrations
migrations = application.wheels.migrator.getAvailableMigrations();
if(ArrayLen(migrations)){
latestVersion = migrations[ArrayLen(migrations)].version;
} else {
latestVersion = 0;
}

Related Functions

Database Migrations