Added check if table exists to shifts migration

This commit is contained in:
Igor Scheller 2021-11-27 11:43:53 +01:00
parent a1f5454bf5
commit 59993788ec
2 changed files with 9 additions and 0 deletions

View File

@ -14,6 +14,10 @@ class AddShiftsDescription extends Migration
*/ */
public function up() public function up()
{ {
if (!$this->schema->hasTable('Shifts')) {
return;
}
$this->schema->table( $this->schema->table(
'Shifts', 'Shifts',
function (Blueprint $table) { function (Blueprint $table) {
@ -27,6 +31,10 @@ class AddShiftsDescription extends Migration
*/ */
public function down() public function down()
{ {
if (!$this->schema->hasTable('Shifts')) {
return;
}
$this->schema->table( $this->schema->table(
'Shifts', 'Shifts',
function (Blueprint $table) { function (Blueprint $table) {

View File

@ -54,6 +54,7 @@ trait HasDatabase
['migration' => '2020_09_12_000000_create_welcome_angel_permissions_group'], ['migration' => '2020_09_12_000000_create_welcome_angel_permissions_group'],
['migration' => '2020_12_28_000000_oauth_set_identifier_binary'], ['migration' => '2020_12_28_000000_oauth_set_identifier_binary'],
['migration' => '2021_08_26_000000_add_shirt_edit_permissions'], ['migration' => '2021_08_26_000000_add_shirt_edit_permissions'],
['migration' => '2021_10_12_000000_add_shifts_description'],
] ]
); );