Skip to content

Migrator

getAvailableMigrations()

getAvailableMigrations() — returns array

Available in: migrator Category: General Functions

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

NameTypeRequiredDefaultDescription
pathstringno[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;
}