Added dealer visit plan migration file
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled

This commit is contained in:
dhanabalan
2026-07-26 10:30:50 +05:30
parent dbd7c2860f
commit 8b01f91bf7

View File

@@ -0,0 +1,51 @@
<?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
{
$sql = <<<'SQL'
CREATE TABLE dealer_visit_plans (
id BIGINT GENERATED always AS IDENTITY PRIMARY KEY,
employee_master_id BIGINT NOT NULL,
name TEXT DEFAULT NULL,
company TEXT DEFAULT NULL,
visit_plan_date DATE DEFAULT NULL,
organizer TEXT DEFAULT NULL,
mobile_number TEXT DEFAULT NULL,
number_of_person TEXT DEFAULT NULL,
purpose_of_visit TEXT DEFAULT NULL,
mode_of_travel TEXT DEFAULT NULL,
status TEXT DEFAULT NULL,
created_at TIMESTAMP NOT NULL DEFAULT NOW(),
updated_at TIMESTAMP,
deleted_at TIMESTAMP,
created_by TEXT NULL,
updated_by TEXT NULL,
FOREIGN KEY (employee_master_id) REFERENCES employee_masters (id)
);
SQL;
DB::statement($sql);
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('dealer_visit_plans');
}
};