feat(card_db): Switch to fully-fledged diesel-based sqlite db

This commit is contained in:
Tristan Daniël Maat 2025-03-14 00:43:34 +08:00
parent 7e9f0ff128
commit 2bb09cbe54
Signed by: tlater
GPG key ID: 49670FD774E43268
14 changed files with 361 additions and 148 deletions
migrations/2025-03-13-161839_create_cards

View file

@ -0,0 +1 @@
-- This file should undo anything in `up.sql`

View file

@ -0,0 +1,7 @@
CREATE TABLE cards (
password PRIMARY KEY,
name VARCHAR NOT NULL,
description TEXT NOT NULL,
frame TEXT CHECK(frame IN ('normal', 'effect', 'ritual', 'fusion', 'synchro', 'xyz', 'link', 'normal_pendulum', 'effect_pendulum', 'ritual_pendulum', 'fusion_pendulum', 'synchro_pendulum', 'xyz_pendulum', 'spell', 'trap', 'token')) NOT NULL,
image TEXT
)