feat: got sqlx working
This commit is contained in:
16
sparse-server/migrations/20250124053720_users.sql
Normal file
16
sparse-server/migrations/20250124053720_users.sql
Normal file
@@ -0,0 +1,16 @@
|
||||
-- Add migration script here
|
||||
CREATE TABLE users (
|
||||
user_id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
|
||||
user_name varchar(255) NOT NULL,
|
||||
password_salt char(64) NOT NULL,
|
||||
password_hash char(64) NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE sessions (
|
||||
session_id char(64) NOT NULL,
|
||||
user_id int NOT NULL,
|
||||
expires int NOT NULL,
|
||||
|
||||
PRIMARY KEY (session_id),
|
||||
FOREIGN KEY (user_id) REFERENCES users
|
||||
);
|
||||
Reference in New Issue
Block a user