<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    public function up(): void
    {
        Schema::create('locker_units', function (Blueprint $table) {
            $table->bigIncrements('LS_ID');
            $table->unsignedBigInteger('Lk_Id');
            $table->string('LS_No', 5);
            $table->timestamps();

            $table->foreign('Lk_Id')->references('Lk_Id')->on('locker_types')->onDelete('restrict');
        });
    }

    public function down(): void
    {
        Schema::dropIfExists('locker_units');
    }
};
