rewrite to sqlx

This commit is contained in:
2025-07-20 14:49:31 +02:00
parent a58df1cb8e
commit 27e9119123
13 changed files with 720 additions and 1004 deletions

18
migrations/001_init.sql Normal file
View File

@@ -0,0 +1,18 @@
CREATE TABLE characters (
id INTEGER PRIMARY KEY AUTOINCREMENT,
rmid INTEGER NOT NULL,
name TEXT NOT NULL,
status TEXT NOT NULL,
species TEXT NOT NULL,
type TEXT NOT NULL,
gender TEXT NOT NULL,
origin_name TEXT NOT NULL,
origin_url TEXT NOT NULL,
location_name TEXT NOT NULL,
location_url TEXT NOT NULL,
image TEXT NOT NULL,
episode TEXT NOT NULL, -- store as comma-separated or JSON
url TEXT NOT NULL,
created TEXT NOT NULL,
elo_rating REAL NOT NULL
);