- Removed old SQLite user schema and replaced it with a new structure that includes password handling and cookie management. - Updated user.go to implement password encryption and user creation logic. - Modified web templates to reflect the new server management system, including the removal of outdated templates and the addition of new server creation and listing functionalities. - Introduced error handling templates for better user feedback on bad requests and server errors. - Added a makefile for easier database setup and management with Docker. Signed-off-by: Matheus Sampaio Queiroga <srherobrine20@gmail.com>
12 lines
354 B
SQL
12 lines
354 B
SQL
PRAGMA foreign_keys = ON;
|
|
CREATE TABLE IF NOT EXISTS "user" (
|
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
name TEXT NOT NULL,
|
|
username TEXT UNIQUE NOT NULL,
|
|
email TEXT UNIQUE NOT NULL,
|
|
permission INTEGER DEFAULT -1
|
|
);
|
|
CREATE TABLE IF NOT EXISTS "password" (
|
|
user_id INTEGER UNIQUE REFERENCES user (id) ON DELETE CASCADE,
|
|
password TEXT NOT NULL
|
|
); |