feat: starting db abstractions

This commit is contained in:
Jef Roosens 2023-05-16 15:47:13 +02:00
parent 303e3ffd4e
commit 0b10885015
Signed by: Jef Roosens
GPG key ID: B75D4F293C7052DB
6 changed files with 119 additions and 44 deletions

View file

@ -1,7 +1,11 @@
-- Your SQL goes here
CREATE TABLE users (
discord_id UNSIGNED BIG INT PRIMARY KEY NOT NULL,
id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
discord_id UNSIGNED BIG INT NOT NULL,
guild_id UNSIGNED BIG INT NOT NULL,
email TEXT UNIQUE NOT NULL,
first_name TEXT NOT NULL,
last_name TEXT NOT NULL
last_name TEXT NOT NULL,
UNIQUE(discord_id, guild_id)
);