ignore casing in usernames

requires database recreation
This commit is contained in:
Jill 2022-12-31 05:09:06 +03:00
parent a7faa055f9
commit f5d2fa8421
2 changed files with 3 additions and 2 deletions

View File

@ -12,7 +12,7 @@ CREATE TABLE users (
account_id INTEGER references accounts(id),
registered INTEGER NOT NULL,
username TEXT NOT NULL,
username TEXT NOT NULL COLLATE NOCASE,
stars INTEGER NOT NULL DEFAULT 0,
demons INTEGER NOT NULL DEFAULT 0,

View File

@ -2,11 +2,12 @@
CREATE TABLE accounts (
id SERIAL PRIMARY KEY,
username TEXT NOT NULL,
username TEXT NOT NULL COLLATE NOCASE,
password TEXT NOT NULL, -- bcrypt hashed
gjp2 TEXT NOT NULL,
email TEXT NOT NULL,
-- todo: swap to proper rank system
is_admin INTEGER NOT NULL DEFAULT 0,
messages_enabled INTEGER NOT NULL DEFAULT 1, -- messages from non-friends enabled