BREAKING CHANGE: V2 of thr SDK #12

Merged
fenpaws merged 124 commits from develop/postgresql into main 2024-07-01 20:46:28 +00:00
Showing only changes of commit 5aa1542074 - Show all commits

View File

@ -17,14 +17,14 @@ CREATE TYPE TagType AS ENUM (
CREATE TABLE "Post"
(
id VARCHAR(25) PRIMARY KEY,
id VARCHAR(25) UNIQUE PRIMARY KEY,
rating Rating,
created_at TIMESTAMP
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
CREATE TABLE "Source"
(
id VARCHAR(25) PRIMARY KEY,
id VARCHAR(25) UNIQUE PRIMARY KEY,
display_name TEXT,
domain TEXT NOT NULL UNIQUE
);
@ -37,8 +37,8 @@ CREATE TABLE "Tag"
CREATE TABLE "User"
(
id TEXT PRIMARY KEY,
created_at TIMESTAMP
id TEXT UNIQUE PRIMARY KEY,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
CREATE TABLE "PostReference"
@ -66,7 +66,7 @@ CREATE TABLE "UserFavorites"
(
user_id TEXT REFERENCES "User" (id),
post_id TEXT REFERENCES "Post" (id),
created_at TIMESTAMP,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (user_id, post_id)
);