Add DB schema for tournament decklists
This commit is contained in:
parent
9c566e997f
commit
09a0ea0fbc
|
@ -14,3 +14,26 @@ CREATE TABLE IF NOT EXISTS CardPrinting (
|
||||||
SetCode VARCHAR(6) NOT NULL,
|
SetCode VARCHAR(6) NOT NULL,
|
||||||
ImageUrl VARCHAR(2048) NOT NULL
|
ImageUrl VARCHAR(2048) NOT NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS TournamentDecklist (
|
||||||
|
Id INT AUTO_INCREMENT PRIMARY KEY,
|
||||||
|
DeckName VARCHAR(100) NOT NULL,
|
||||||
|
DatePublished DATE NOT NULL,
|
||||||
|
Source VARCHAR(200) NOT NULL,
|
||||||
|
Format VARCHAR(25) NOT NULL,
|
||||||
|
AuthorName VARCHAR(100) NOT NULL
|
||||||
|
);
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS TournamentDecklistCard (
|
||||||
|
TournamentDecklistId INT NOT NULL,
|
||||||
|
GamepieceId INT NOT NULL,
|
||||||
|
PRIMARY KEY (TournamentDecklistId, GamepieceId),
|
||||||
|
|
||||||
|
FOREIGN KEY TournamentDecklistId REFERENCES TournamentDecklist(Id),
|
||||||
|
FOREIGN KEY GamepieceId REFERENCES Gamepiece(Id),
|
||||||
|
|
||||||
|
CardPrintingId INT NULL,
|
||||||
|
FOREIGN KEY CardPrintingId REFERENCES CardPrinting(Id),
|
||||||
|
|
||||||
|
Quantity INT NOT NULL
|
||||||
|
);
|
||||||
|
|
Loading…
Reference in New Issue