repuve-backend-v1/database/migrations/2025_10_18_140500_create_packages_table.php

33 lines
787 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('packages', function (Blueprint $table) {
$table->id();
$table->string('lot');
$table->string('box_number');
$table->integer('starting_page');
$table->integer('ending_page');
$table->foreignId('module_id')->constrained('modules')->cascadeOnDelete();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('packages');
}
};