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

40 lines
1.1 KiB
PHP
Raw Normal View History

2025-11-06 17:09:52 +05:30
<?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()
{
Schema::create('requests', function (Blueprint $table) {
$table->id(); // Auto-increment primary key
$table->string('request_id')->unique(); // Custom formatted ID like REQ-2025-000001
$table->string('customer_name');
$table->string('company_name');
$table->string('designation');
$table->string('email')->unique();
$table->string('mobile_no');
$table->string('priority')->nullable();
$table->text('address')->nullable();
$table->string('pincode')->nullable();
$table->date('date')->nullable();
$table->enum('status', ['pending', 'approved', 'rejected'])->default('pending');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('requests');
}
};