diff --git a/db/migrations/2021_10_12_000000_add_shifts_description.php b/db/migrations/2021_10_12_000000_add_shifts_description.php index 15faeb97..d061f3ee 100644 --- a/db/migrations/2021_10_12_000000_add_shifts_description.php +++ b/db/migrations/2021_10_12_000000_add_shifts_description.php @@ -14,6 +14,10 @@ class AddShiftsDescription extends Migration */ public function up() { + if (!$this->schema->hasTable('Shifts')) { + return; + } + $this->schema->table( 'Shifts', function (Blueprint $table) { @@ -27,6 +31,10 @@ class AddShiftsDescription extends Migration */ public function down() { + if (!$this->schema->hasTable('Shifts')) { + return; + } + $this->schema->table( 'Shifts', function (Blueprint $table) { diff --git a/tests/Unit/HasDatabase.php b/tests/Unit/HasDatabase.php index f5c87491..cf9483f3 100644 --- a/tests/Unit/HasDatabase.php +++ b/tests/Unit/HasDatabase.php @@ -54,6 +54,7 @@ trait HasDatabase ['migration' => '2020_09_12_000000_create_welcome_angel_permissions_group'], ['migration' => '2020_12_28_000000_oauth_set_identifier_binary'], ['migration' => '2021_08_26_000000_add_shirt_edit_permissions'], + ['migration' => '2021_10_12_000000_add_shifts_description'], ] );