Added request characteristics migration file
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Gemini PR Review / Gemini PR Review (pull_request) Failing after 16s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 11s
Laravel Larastan / larastan (pull_request) Failing after 3m8s
Laravel Pint / pint (pull_request) Successful in 2m52s

This commit is contained in:
dhanabalan
2026-01-24 11:09:05 +05:30
parent bfdc5c85ab
commit 247c671fc3

View File

@@ -0,0 +1,65 @@
<?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 request_characteristics (
id BIGINT GENERATED always AS IDENTITY PRIMARY KEY,
plant_id BIGINT NOT NULL,
machine_id BIGINT NOT NULL,
item_id BIGINT NOT NULL,
characteristic_approver_master_id BIGINT NOT NULL,
aufnr TEXT DEFAULT NULL,
characteristic_name TEXT DEFAULT NULL,
current_value TEXT DEFAULT NULL,
update_value TEXT DEFAULT NULL,
approver_status1 TEXT DEFAULT NULL,
approver_status2 TEXT DEFAULT NULL,
approver_status3 TEXT DEFAULT NULL,
approver_remark1 TEXT DEFAULT NULL,
approver_remark2 TEXT DEFAULT NULL,
approver_remark3 TEXT DEFAULT NULL,
work_flow_id TEXT DEFAULT NULL,
mail_status TEXT DEFAULT NULL,
trigger_at TIMESTAMP,
approved1_at TIMESTAMP,
approved2_at TIMESTAMP,
approved3_at TIMESTAMP,
created_at TIMESTAMP NOT NULL DEFAULT NOW(),
updated_at TIMESTAMP NOT NULL DEFAULT NOW(),
created_by TEXT DEFAULT NULL,
updated_by TEXT DEFAULT NULL,
deleted_at TIMESTAMP,
FOREIGN KEY (plant_id) REFERENCES plants(id),
FOREIGN KEY (machine_id) REFERENCES machines(id),
FOREIGN KEY (item_id) REFERENCES items(id),
FOREIGN KEY (characteristic_approver_master_id) REFERENCES characteristic_approver_masters(id)
);
SQL;
DB::statement($sql);
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('request_characteristics');
}
};