diesel -> sqlx, patch cve (again lul)
This commit is contained in:
parent
a5cac129dd
commit
c3bb6d0d67
39 changed files with 1581 additions and 1207 deletions
23
migrations/20231018025924_accounts.up.sql
Normal file
23
migrations/20231018025924_accounts.up.sql
Normal file
|
@ -0,0 +1,23 @@
|
|||
CREATE TABLE accounts (
|
||||
id INTEGER NOT NULL PRIMARY KEY,
|
||||
|
||||
username VARCHAR(20) NOT NULL COLLATE NOCASE UNIQUE,
|
||||
gjp2 TEXT NOT NULL, -- argon2 hashed (rubrub uses bcrypt but oh well)
|
||||
password TEXT NOT NULL, -- argon2 hashed (rubrub uses bcrypt but oh well)
|
||||
email VARCHAR(254) NOT NULL,
|
||||
|
||||
-- todo: swap to proper rank system
|
||||
is_admin INTEGER NOT NULL DEFAULT 0,
|
||||
|
||||
-- 0: disabled, 1: only for friends, 2: open to all
|
||||
messages_enabled INTEGER NOT NULL DEFAULT 2,
|
||||
comments_enabled INTEGER NOT NULL DEFAULT 0,
|
||||
-- 0: disabled, 1: enabled
|
||||
friend_requests_enabled INTEGER NOT NULL DEFAULT 1, -- frs enabled
|
||||
|
||||
youtube_url VARCHAR(30),
|
||||
twitter_url VARCHAR(20),
|
||||
twitch_url VARCHAR(20),
|
||||
|
||||
created_at TEXT NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'now'))
|
||||
);
|
Loading…
Add table
Add a link
Reference in a new issue