Run both legacy schema and migrations in the same run if needed (#9686)

That way any new migrations get applied when needed
This commit is contained in:
Tony Murray
2019-01-17 11:37:14 -06:00
committed by GitHub
parent 3099b6793a
commit f1928461a8

View File

@@ -55,10 +55,7 @@ try {
$migrate_opts['--seed'] = true;
$return = Artisan::call('migrate', $migrate_opts);
echo Artisan::output();
} elseif ($db_rev == 1000) {
$return = Artisan::call('migrate', $migrate_opts);
echo Artisan::output();
} else {
} elseif ($db_rev < 1000) {
// legacy update
d_echo("DB Schema update started....\n");
@@ -102,6 +99,12 @@ try {
echo "-- Done\n";
// end legacy update
$db_rev = get_db_schema();
}
if ($db_rev == 1000) {
$return = Artisan::call('migrate', $migrate_opts);
echo Artisan::output();
}
if (isset($schemaLock)) {