mirror of
https://github.com/siteboon/claudecodeui.git
synced 2025-12-11 14:39:37 +00:00
16 lines
515 B
SQL
16 lines
515 B
SQL
-- Initialize authentication database
|
|
PRAGMA foreign_keys = ON;
|
|
|
|
-- Users table (single user system)
|
|
CREATE TABLE IF NOT EXISTS users (
|
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
username TEXT UNIQUE NOT NULL,
|
|
password_hash TEXT NOT NULL,
|
|
created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
|
|
last_login DATETIME,
|
|
is_active BOOLEAN DEFAULT 1
|
|
);
|
|
|
|
-- Indexes for performance
|
|
CREATE INDEX IF NOT EXISTS idx_users_username ON users(username);
|
|
CREATE INDEX IF NOT EXISTS idx_users_active ON users(is_active); |