Add --force flag to migrations (#1203)
This commit is contained in:
@@ -82,7 +82,7 @@ class MigrationService extends Service
|
|||||||
// A little ugly, run the main migration first, this makes sure the migration table is there
|
// A little ugly, run the main migration first, this makes sure the migration table is there
|
||||||
$output = '';
|
$output = '';
|
||||||
|
|
||||||
Artisan::call('migrate');
|
Artisan::call('migrate', ['--force' => true]);
|
||||||
$output .= trim(Artisan::output());
|
$output .= trim(Artisan::output());
|
||||||
|
|
||||||
// Then get any remaining migrations that are left over
|
// Then get any remaining migrations that are left over
|
||||||
|
|||||||
@@ -126,7 +126,7 @@ class ModuleService extends Service
|
|||||||
'enabled' => 1,
|
'enabled' => 1,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
Artisan::call('module:migrate '.$module_name);
|
Artisan::call('module:migrate '.$module_name, ['--force' => true]);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -225,7 +225,7 @@ class ModuleService extends Service
|
|||||||
}
|
}
|
||||||
|
|
||||||
Artisan::call('config:cache');
|
Artisan::call('config:cache');
|
||||||
Artisan::call('module:migrate '.$module);
|
Artisan::call('module:migrate '.$module, ['--force' => true]);
|
||||||
|
|
||||||
return flash()->success('Module Installed');
|
return flash()->success('Module Installed');
|
||||||
}
|
}
|
||||||
@@ -246,7 +246,7 @@ class ModuleService extends Service
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
if ($status === true) {
|
if ($status === true) {
|
||||||
Artisan::call('module:migrate '.$module->name);
|
Artisan::call('module:migrate '.$module->name, ['--force' => true]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
+1
-1
@@ -60,7 +60,7 @@ abstract class TestCase extends \Illuminate\Foundation\Testing\TestCase
|
|||||||
Notification::fake();
|
Notification::fake();
|
||||||
|
|
||||||
Artisan::call('database:create', ['--reset' => true]);
|
Artisan::call('database:create', ['--reset' => true]);
|
||||||
Artisan::call('migrate:refresh', ['--env' => 'testing']);
|
Artisan::call('migrate:refresh', ['--env' => 'testing', '--force' => true]);
|
||||||
|
|
||||||
// $this->disableExceptionHandling();
|
// $this->disableExceptionHandling();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user