Files
gemp-lotr/gemp-lotr/db/deck-format-upgrade.sql
Christian 'ketura' McCarty 0c68909409 Added target format to the deck definition
Overhauled all references to deck construction to include target format.
Altered deck builder to only show the validations for the selected target format.
Expanded the deck builder validation to show all problems with the deck instead of just one.
Added target format to the list of decks.
Expanded the error message in the game hall when an invalid deck is chosen for a given format.
Added the target format into the deck selection dropdown in the main hall.
2022-08-02 00:49:12 -05:00

27 lines
521 B
SQL

SELECT *
FROM gemp_db.deck d
ORDER BY ID DESC
ALTER TABLE gemp_db.deck
ADD COLUMN target_format VARCHAR(50) NOT NULL DEFAULT 'Anything Goes' AFTER name;
ALTER TABLE gemp_db.deck
MODIFY COLUMN name VARCHAR(100) NOT NULL;
ALTER TABLE gemp_db.deck ADD FOREIGN KEY (player_id) REFERENCES gemp_db.player(id);
-- DELETE
-- SELECT *
FROM gemp_db.deck
-- LEFT JOIN gemp_db.player p
-- ON P.id = d.player_id
WHERE player_id IN (1, 2, 7)
ORDER BY D.ID DESC
SELECT *
FROM gemp_db.player p
WHERE p.id IN (1, 2, 7)