consolidate password_hash into 001 migration
Some checks failed
check / check (push) Failing after 1m27s
Some checks failed
check / check (push) Failing after 1m27s
Pre-1.0, no installed base — merge 002_add_passwords.sql into 001_initial.sql and remove the separate migration file.
This commit is contained in:
@@ -1,11 +1,12 @@
|
|||||||
-- Chat server schema (pre-1.0 consolidated)
|
-- Chat server schema (pre-1.0 consolidated)
|
||||||
PRAGMA foreign_keys = ON;
|
PRAGMA foreign_keys = ON;
|
||||||
|
|
||||||
-- Sessions: IRC-style sessions (no passwords, nick + optional signing key)
|
-- Sessions: each session is a user identity (nick + optional password + signing key)
|
||||||
CREATE TABLE IF NOT EXISTS sessions (
|
CREATE TABLE IF NOT EXISTS sessions (
|
||||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||||
uuid TEXT NOT NULL UNIQUE,
|
uuid TEXT NOT NULL UNIQUE,
|
||||||
nick TEXT NOT NULL UNIQUE,
|
nick TEXT NOT NULL UNIQUE,
|
||||||
|
password_hash TEXT NOT NULL DEFAULT '',
|
||||||
signing_key TEXT NOT NULL DEFAULT '',
|
signing_key TEXT NOT NULL DEFAULT '',
|
||||||
created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
|
created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
|
||||||
last_seen DATETIME DEFAULT CURRENT_TIMESTAMP
|
last_seen DATETIME DEFAULT CURRENT_TIMESTAMP
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
ALTER TABLE sessions ADD COLUMN password_hash TEXT NOT NULL DEFAULT '';
|
|
||||||
Reference in New Issue
Block a user