Import Fun Completed and Sticker Master

This commit is contained in:
dhanabalan
2025-03-28 16:52:40 +05:30
parent ef4504155a
commit e46f290fd1
47 changed files with 1317 additions and 335 deletions

View File

@@ -14,8 +14,6 @@ return new class extends Migration
CREATE TABLE items (
id BIGINT GENERATED always AS IDENTITY PRIMARY KEY,
line_id BIGINT NOT NULL,
block_id BIGINT NOT NULL,
plant_id BIGINT NOT NULL,
code TEXT NOT NULL CHECK (LENGTH(code) >= 6),
@@ -27,9 +25,7 @@ return new class extends Migration
updated_at TIMESTAMP NOT NULL DEFAULT NOW(),
deleted_at TIMESTAMP,
UNIQUE (code, line_id, block_id, plant_id),
FOREIGN KEY (line_id) REFERENCES lines (id),
FOREIGN KEY (block_id) REFERENCES blocks (id),
UNIQUE (code, plant_id),
FOREIGN KEY (plant_id) REFERENCES plants (id)
);
SQL;