-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsql.psql
40 lines (24 loc) · 1.04 KB
/
sql.psql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
DROP SCHEMA public CASCADE;
CREATE SCHEMA public;
CREATE TABLE IF NOT EXISTS users (
user_id serial PRIMARY KEY,
email_address text NOT NULL,
account_password text NOT NULL,
dark_mode boolean NOT NULL,
created_date timestamp NOT NULL,
modified_date timestamp NOT NULL
);
--to have prisma generate db tables from the models in schema.prisma, run cmd:
--npx prisma migrate dev --name init
INSERT INTO "Users" ("emailAddress", "accountPassword", "updatedAt")
VALUES ('[email protected]', 'abc123', NOW());
INSERT INTO "Puzzle" ("puzzleDate", word, "updatedAt")
VALUES ('2022-05-16', 'ENJOY', NOW());
INSERT INTO "Puzzle" ("puzzleDate", word, "updatedAt")
VALUES ('2022-05-16', 'HELLO', NOW());
INSERT INTO "Puzzle" ("puzzleDate", word, "updatedAt")
VALUES ('2022-05-17', 'ENJOY', NOW());
INSERT INTO "Puzzle" ("puzzleDate", word, "updatedAt")
VALUES ('2022-05-18', 'REACT', NOW());
INSERT INTO "PuzzleResult" ("puzzleId", "userId", "startTime", "endTime", "guessCount", "isWin", "updatedAt")
VALUES (1, 1, NOW(), NOW(), 5, TRUE, NOW());