35 lines
859 B
PHP
35 lines
859 B
PHP
<?php
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
return new class extends Migration
|
|
{
|
|
/**
|
|
* Run the migrations.
|
|
*/
|
|
public function up(): void
|
|
{
|
|
Schema::create('ms_agency', function (Blueprint $table) {
|
|
$table->id('MsAgencyId');
|
|
$table->uuid('uuid');
|
|
$table->string('name');
|
|
$table->string('scope');
|
|
$table->integer('row_status')->default(1);
|
|
$table->integer('ms_group_id');
|
|
$table->timestampsTz();
|
|
|
|
$table->foreign('ms_group_id')->references('MsGroupId')->on('ms_group')->cascadeOnDelete();
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*/
|
|
public function down(): void
|
|
{
|
|
Schema::dropIfExists('agencies');
|
|
}
|
|
};
|