From 0e1647bb2dcdff5a5a45856827342983e3892ef2 Mon Sep 17 00:00:00 2001 From: The Magician Date: Wed, 9 Oct 2024 23:12:56 +0100 Subject: [PATCH] Add CardScan table and CardPrinting for scanned but unidentified cards --- sevenkeys/database/sql/createdb.sql | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/sevenkeys/database/sql/createdb.sql b/sevenkeys/database/sql/createdb.sql index 35e2a61..c4cd33a 100644 --- a/sevenkeys/database/sql/createdb.sql +++ b/sevenkeys/database/sql/createdb.sql @@ -26,6 +26,26 @@ CREATE TABLE IF NOT EXISTS CardPrinting ( Language VARCHAR(3) NOT NULL ); +INSERT INTO CardPrinting ( + Id, + Name, + SetCode, + IsFoil, + IsPromo, + CollectorNumber, + ImageUrl, + Language, +) VALUES ( + '00000000-0000-0000-0000-0000000000000', + 'Scanned Card Placeholder', + 'lea', + 0, + 0, + 0, + '', + 'en', +); + CREATE TABLE IF NOT EXISTS StorageArea ( Id INT AUTO_INCREMENT PRIMARY KEY, Name VARCHAR(100) NOT NULL, @@ -40,3 +60,9 @@ CREATE TABLE IF NOT EXISTS CardLocation ( FOREIGN KEY (StorageAreaId) REFERENCES StorageArea(Id), Position INT NULL ); + +CREATE TABLE IF NOT EXISTS CardScan ( + Id INT PRIMARY KEY AUTO_INCREMENT, + CardLocationId INT NOT NULL, + Filename VARCHAR(100) NOT NULL +);