Migrator
getCurrentMigrationVersion()
Signature
Section titled “Signature”getCurrentMigrationVersion() — returns string
Available in: migrator
Category: General Functions
Description
Section titled “Description”Returns current database version. Whilst you can use this in your application, the recommended usage is via either the CLI or the provided GUI interface
Examples
Section titled “Examples”// 1. Get current database version
currentVersion = application.wheels.migrator.getCurrentMigrationVersion();
// currentVersion -> "20240315120000" (timestamp-style version string, or "0" if no migrations have run)
// 2. Display version status in a maintenance view
currentVersion = application.wheels.migrator.getCurrentMigrationVersion();
if (currentVersion == "0") {
writeOutput("No migrations have been applied yet.");
} else {
writeOutput("Database is at version: " & currentVersion);
}