Add StorageArea table

This commit is contained in:
The Magician 2024-08-17 20:14:08 +01:00
parent 1330c8c507
commit 5c508f035c
1 changed files with 10 additions and 4 deletions

View File

@ -25,12 +25,18 @@ CREATE TABLE IF NOT EXISTS CardPrinting (
Language VARCHAR(3) NOT NULL
);
CREATE TABLE IF NOT EXISTS CardStorageLocation (
CREATE TABLE IF NOT EXISTS StorageArea (
Id INT AUTO_INCREMENT PRIMARY KEY,
Name VARCHAR(100) NOT NULL,
StorageType ENUM('Toolkit', 'Deck', 'Binder', 'Bulk')
);
CREATE TABLE IF NOT EXISTS CardLocation (
Id INT AUTO_INCREMENT PRIMARY KEY,
CardPrintingId VARCHAR(37) NOT NULL,
FOREIGN KEY (CardPrintingId) REFERENCES CardPrinting(Id),
CardCondition ENUM('Mint', 'Near Mint', 'Excellent', 'Good', 'Light Played', 'Played', 'Poor') NOT NULL,
StorageBox VARCHAR(20) NOT NULL,
Position INT NOT NULL,
Source VARCHAR(100) NULL
StorageAreaId INT NOT NULL,
FOREIGN KEY (StorageAreaId) REFERENCES StorageArea(Id),
Location INT NULL
);