TheMathemagicians/sevenkeys/database/migrations/00005_add_cardlocation_tabl...

18 lines
470 B
MySQL
Raw Normal View History

2024-11-25 17:13:50 +00:00
-- +goose Up
-- +goose StatementBegin
CREATE TABLE IF NOT EXISTS CardLocation (
Id INT AUTO_INCREMENT PRIMARY KEY,
CardPrintingId VARCHAR(37) NULL,
FOREIGN KEY (CardPrintingId) REFERENCES CardPrinting(Id),
StorageAreaId INT NOT NULL,
FOREIGN KEY (StorageAreaId) REFERENCES StorageArea(Id),
Position INT NULL,
CardtraderProductId INT NULL
);
-- +goose StatementEnd
-- +goose Down
-- +goose StatementBegin
DROP TABLE IF EXISTS CardLocation;
-- +goose StatementEnd