2023-04-11 09:21:20 +00:00
|
|
|
<?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('jobs', function (Blueprint $table) {
|
|
|
|
$table->id();
|
2023-04-14 02:14:37 +00:00
|
|
|
$table->foreignId('directorat_id')->constrained('directorats')->onDelete('cascade');
|
|
|
|
$table->foreignId('sub_directorat_id')->constrained('sub_directorats')->onDelete('cascade');
|
2023-04-11 09:21:20 +00:00
|
|
|
$table->string('kode',2);
|
2023-04-12 10:06:33 +00:00
|
|
|
$table->string('name',50);
|
2023-04-11 09:21:20 +00:00
|
|
|
$table->timestamps();
|
|
|
|
$table->softDeletes();
|
2023-04-17 02:22:49 +00:00
|
|
|
|
|
|
|
$table->unsignedBigInteger('created_by')->nullable();
|
|
|
|
$table->unsignedBigInteger('updated_by')->nullable();
|
|
|
|
$table->unsignedBigInteger('deleted_by')->nullable();
|
2023-04-11 09:21:20 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Reverse the migrations.
|
|
|
|
*/
|
|
|
|
public function down(): void
|
|
|
|
{
|
|
|
|
Schema::dropIfExists('jobs');
|
|
|
|
}
|
|
|
|
};
|