Masters and Transaction table column type update CITEXT
This commit is contained in:
@@ -19,8 +19,8 @@ return new class extends Migration
|
||||
block_id BIGINT NOT NULL,
|
||||
plant_id BIGINT NOT NULL,
|
||||
|
||||
code TEXT NOT NULL,
|
||||
reason TEXT NOT NULL,
|
||||
code CITEXT NOT NULL,
|
||||
reason CITEXT NOT NULL,
|
||||
|
||||
created_at TIMESTAMP NOT NULL DEFAULT NOW(),
|
||||
updated_at TIMESTAMP NOT NULL DEFAULT NOW(),
|
||||
|
||||
@@ -18,8 +18,8 @@ return new class extends Migration
|
||||
block_id BIGINT NOT NULL,
|
||||
plant_id BIGINT NOT NULL,
|
||||
|
||||
name TEXT NOT NULL,
|
||||
type TEXT NOT NULL,
|
||||
name CITEXT NOT NULL,
|
||||
type CITEXT NOT NULL,
|
||||
|
||||
created_at TIMESTAMP NOT NULL DEFAULT NOW(),
|
||||
updated_at TIMESTAMP NOT NULL DEFAULT NOW(),
|
||||
|
||||
@@ -19,8 +19,7 @@ return new class extends Migration
|
||||
block_id BIGINT NOT NULL,
|
||||
plant_id BIGINT NOT NULL,
|
||||
code_id BIGINT NOT NULL,
|
||||
|
||||
reason TEXT NOT NULL,
|
||||
reason_id BIGINT NOT NULL,
|
||||
|
||||
from_datetime TIMESTAMP NOT NULL,
|
||||
to_datetime TIMESTAMP NOT NULL,
|
||||
@@ -35,7 +34,8 @@ return new class extends Migration
|
||||
FOREIGN KEY (shift_id) REFERENCES shifts (id),
|
||||
FOREIGN KEY (block_id) REFERENCES blocks (id),
|
||||
FOREIGN KEY (plant_id) REFERENCES plants (id),
|
||||
FOREIGN KEY (code_id) REFERENCES line_stops (id)
|
||||
FOREIGN KEY (code_id) REFERENCES line_stops (id),
|
||||
FOREIGN KEY (reason_id) REFERENCES line_stops (id)
|
||||
);
|
||||
SQL;
|
||||
|
||||
|
||||
@@ -19,15 +19,16 @@ return new class extends Migration
|
||||
shift_id BIGINT NOT NULL,
|
||||
block_id BIGINT NOT NULL,
|
||||
plant_id BIGINT NOT NULL,
|
||||
item_id BIGINT NOT NULL,
|
||||
|
||||
item_code TEXT NOT NULL,
|
||||
serial_number TEXT NOT NULL,
|
||||
serial_number CITEXT NOT NULL UNIQUE,
|
||||
|
||||
created_at TIMESTAMP NOT NULL DEFAULT NOW(),
|
||||
updated_at TIMESTAMP NOT NULL DEFAULT NOW(),
|
||||
deleted_at TIMESTAMP,
|
||||
|
||||
UNIQUE (item_code, serial_number),
|
||||
UNIQUE (item_id, serial_number),
|
||||
FOREIGN KEY (item_id) REFERENCES items (id),
|
||||
FOREIGN KEY (line_id) REFERENCES lines (id),
|
||||
FOREIGN KEY (shift_id) REFERENCES shifts (id),
|
||||
FOREIGN KEY (block_id) REFERENCES blocks (id),
|
||||
|
||||
Reference in New Issue
Block a user