add ´unique´ constraint in db init script for username

This commit is contained in:
2025-08-04 09:41:13 +02:00
parent 5a06c99fb7
commit e45b0e34c9

View File

@@ -5,7 +5,7 @@ const db = new Database('./src/lib/data/tatort.db');
let createSQLStmt = `CREATE TABLE IF NOT EXISTS users let createSQLStmt = `CREATE TABLE IF NOT EXISTS users
(id INTEGER PRIMARY KEY AUTOINCREMENT, (id INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT NOT NULL, name TEXT NOT NULL UNIQUE,
pw TEXT NOT NULL)`; pw TEXT NOT NULL)`;
db.exec(createSQLStmt); db.exec(createSQLStmt);