Files
Kent-logistics-Laravel/database/migrations/2025_01_01_000001_create_installments_table.php

41 lines
1017 B
PHP
Raw Permalink Normal View History

2025-11-21 16:07:43 +05:30
<?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('installments', function (Blueprint $table) {
$table->id();
$table->foreignId('entry_id')
->constrained('entries')
->onDelete('cascade');
$table->date('proc_date'); // processing date
$table->decimal('amount', 12, 2);
$table->string('description')->nullable();
$table->string('region')->nullable();
$table->enum('status', [
'Pending',
'Loading',
'Packed',
'Dispatched',
'Delivered'
])->default('Pending');
$table->timestamps();
});
}
public function down(): void
{
Schema::dropIfExists('installments');
}
};