Add StorageArea table
This commit is contained in:
parent
1330c8c507
commit
5c508f035c
|
@ -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
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue