Created a base to build on

This commit is contained in:
2025-12-22 21:19:31 +01:00
parent a1e33bd403
commit 47a9719eeb
20 changed files with 1590 additions and 0 deletions

21
db/schema.sql Normal file
View File

@@ -0,0 +1,21 @@
CREATE TABLE users (
id BIGSERIAL PRIMARY KEY,
name text NOT NULL,
email text NOT NULL UNIQUE,
password_hash text NOT NULL,
bio text
);
CREATE TABLE platform (
id BIGSERIAL PRIMARY KEY,
name text NOT NULL
);
CREATE TABLE game (
id BIGSERIAL PRIMARY KEY,
name text NOT NULL,
platform_id BIGINT NOT NULL REFERENCES platform(id),
score INT NOT NULL,
release_year DATE NOT NULL,
finished DATE
);