Files
vibetorrent/shared/migrations/001_init.sql
spinline 4b3e713657
All checks were successful
Build MIPS Binary / build (push) Successful in 5m17s
refactor: move DB to shared crate, convert push endpoints to server functions, remove dead REST handlers
2026-02-10 02:05:04 +03:00

17 lines
422 B
SQL

-- 001_init.sql
-- Initial schema for users and sessions
CREATE TABLE IF NOT EXISTS users (
id INTEGER PRIMARY KEY,
username TEXT NOT NULL UNIQUE,
password_hash TEXT NOT NULL,
created_at DATETIME DEFAULT CURRENT_TIMESTAMP
);
CREATE TABLE IF NOT EXISTS sessions (
token TEXT PRIMARY KEY,
user_id INTEGER NOT NULL,
expires_at DATETIME NOT NULL,
FOREIGN KEY(user_id) REFERENCES users(id)
);