diff --git a/database/migrations/2024_04_19_225021_create_workday_demographics.php b/database/migrations/2024_04_19_225021_create_workday_demographics.php index e3d742fb5..651ea7e85 100644 --- a/database/migrations/2024_04_19_225021_create_workday_demographics.php +++ b/database/migrations/2024_04_19_225021_create_workday_demographics.php @@ -5,23 +5,25 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration { +return new class () extends Migration { /** * Run the migrations. */ public function up(): void { - Schema::create('workday_demographics', function (Blueprint $table) { - $table->id(); - $table->foreignIdFor(Workday::class); - $table->string('type'); - $table->string('subtype')->nullable(); - $table->string('name')->nullable(); - $table->integer('amount'); + if (! Schema::hasTable('workday_demographics')) { + Schema::create('workday_demographics', function (Blueprint $table) { + $table->id(); + $table->foreignIdFor(Workday::class); + $table->string('type'); + $table->string('subtype')->nullable(); + $table->string('name')->nullable(); + $table->integer('amount'); - $table->softDeletes(); - $table->timestamps(); - }); + $table->softDeletes(); + $table->timestamps(); + }); + } } /**