Add SQLite database support and user management functionality

This commit is contained in:
Andrea Moro 2025-01-31 13:43:35 +01:00
parent 6ebdef9a64
commit 8df02b7a5a
8 changed files with 1362 additions and 9 deletions

View file

@ -0,0 +1,9 @@
-- Create the users table
CREATE TABLE IF NOT EXISTS users (
id INTEGER PRIMARY KEY AUTOINCREMENT, -- Unique ID for each user
username TEXT NOT NULL UNIQUE, -- Username, must be unique
password_hash TEXT NOT NULL -- Hashed password for security
);
-- Create an index on the username and email columns for faster lookups
CREATE INDEX IF NOT EXISTS idx_users_username ON users (username);