Tambah migrasi baru untuk tabel "holiday_calendars"
Menambahkan file migrasi untuk membuat tabel "holiday_calendars" yang menyimpan informasi tanggal libur beserta deskripsi dan jenisnya (libur nasional atau cuti bersama). Tabel ini juga memiliki kolom untuk pencatatan waktu pembuatan, update, soft delete, serta pencatatan pengguna yang melakukan perubahan.
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
<?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('holiday_calendars', function (Blueprint $table) {
|
||||
Schema::create('holiday_calendars', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->date('date');
|
||||
$table->string('description');
|
||||
$table->enum('type', ['national_holiday', 'collective_leave']);
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
$table->unsignedBigInteger('created_by')->nullable();
|
||||
$table->unsignedBigInteger('updated_by')->nullable();
|
||||
$table->unsignedBigInteger('deleted_by')->nullable();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('holiday_calendars');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user