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:
Daeng Deni Mardaeni
2024-11-15 09:48:33 +07:00
parent eecc4e6b95
commit 023626d791

View File

@@ -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');
}
};