Created a base to build on
This commit is contained in:
21
db/schema.sql
Normal file
21
db/schema.sql
Normal 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
|
||||
);
|
||||
Reference in New Issue
Block a user