Add SQLite database support and user management functionality
This commit is contained in:
parent
6ebdef9a64
commit
8df02b7a5a
8 changed files with 1362 additions and 9 deletions
9
migrations/001_create_users_table.sql
Normal file
9
migrations/001_create_users_table.sql
Normal 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);
|
Loading…
Add table
Add a link
Reference in a new issue