Skip to content

Commit b564616

Browse files
committed
fix: Compatibility for commandbox-migrations v3
1 parent f0139f1 commit b564616

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

models/MigrationService.cfc

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
component accessors="true" {
22

33
property name="wirebox" inject="wirebox";
4-
property name="environment" inject="coldbox:setting:environment" default="development";
4+
property name="configSettings" inject="box:configSettings";
5+
property name="environment" default="development";
56
property name="manager" default="cfmigrations.models.QBMigrationManager";
67
property name="migrationsDirectory" default="/resources/database/migrations";
78
property name="seedsDirectory" default="/resources/database/seeds";
@@ -55,6 +56,16 @@ component accessors="true" {
5556
initArguments = variables.managerProperties
5657
);
5758
}
59+
if ( variables.configSettings.keyExists( "environment" ) ) {
60+
variables.environment = variables.configSettings.environment;
61+
}
62+
}
63+
64+
/**
65+
* Passes through to the manager's isReady method.
66+
*/
67+
public boolean function isReady() {
68+
return variables.manager.isReady();
5869
}
5970

6071
/**

0 commit comments

Comments
 (0)