Skip to content

Commit

Permalink
[TM-961] verify existence of workday_demographics table in migration
Browse files Browse the repository at this point in the history
  • Loading branch information
cesarLima1 committed Jun 13, 2024
1 parent 37360e0 commit 91884d3
Showing 1 changed file with 13 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
});
}
}

/**
Expand Down

0 comments on commit 91884d3

Please sign in to comment.