Commit b3f7ac1 1 parent cf29ab0 commit b3f7ac1 Copy full SHA for b3f7ac1
File tree 1 file changed +13
-1
lines changed
1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ class SetupCommand extends Command {
41
41
const os = require ( 'os' ) ;
42
42
const url = require ( 'url' ) ;
43
43
const path = require ( 'path' ) ;
44
+ const semver = require ( 'semver' ) ;
44
45
45
46
const linux = require ( '../tasks/linux' ) ;
46
47
const migrate = require ( '../tasks/migrate' ) ;
@@ -81,6 +82,7 @@ class SetupCommand extends Command {
81
82
} ) ;
82
83
83
84
// Special-case migrations
85
+ // @TODO : how to manage ghost setup migrate in 2.0?
84
86
if ( argv . stages . includes ( 'migrate' ) ) {
85
87
tasks . push ( { title : 'Running database migrations' , task : migrate } )
86
88
}
@@ -171,10 +173,20 @@ class SetupCommand extends Command {
171
173
} ) ) ;
172
174
173
175
if ( argv . migrate !== false ) {
176
+ const instance = this . system . getInstance ( ) ;
177
+
174
178
// Tack on db migration task to the end
175
179
tasks . push ( {
176
180
title : 'Running database migrations' ,
177
- task : migrate
181
+ task : migrate ,
182
+ // CASE: We are about to install Ghost 2.0. We moved the execution of knex-migrator into Ghost.
183
+ enabled : ( ) => {
184
+ if ( semver . satisfies ( instance . cliConfig . get ( 'active-version' ) , '^2.0.0' ) ) {
185
+ return false ;
186
+ }
187
+
188
+ return true ;
189
+ }
178
190
} ) ;
179
191
}
180
192
You can’t perform that action at this time.
0 commit comments