SDK v3 #8
@ -79,16 +79,12 @@ CREATE TABLE "TagGroup"
|
||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
|
||||
CREATE TABLE "UserFavorites"
|
||||
(
|
||||
user_id TEXT REFERENCES "User" (id),
|
||||
post_id TEXT REFERENCES "Post" (id),
|
||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (user_id, post_id)
|
||||
);
|
||||
|
||||
CREATE TABLE "UserSource"
|
||||
(
|
||||
id CHAR(25) PRIMARY KEY,
|
||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
deleted_at TIMESTAMP NULL NULL,
|
||||
user_id TEXT REFERENCES "User" (id),
|
||||
source_id TEXT REFERENCES "Source" (id),
|
||||
scrape_time_interval INT,
|
||||
@ -97,10 +93,20 @@ CREATE TABLE "UserSource"
|
||||
last_scrape_time TIMESTAMP,
|
||||
account_validate BOOL DEFAULT FALSE,
|
||||
account_validation_key CHAR(25),
|
||||
PRIMARY KEY (user_id, source_id),
|
||||
UNIQUE (source_id, account_username, account_id)
|
||||
);
|
||||
|
||||
CREATE TABLE "UserFavorites"
|
||||
(
|
||||
id CHAR(25) PRIMARY KEY,
|
||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
deleted_at TIMESTAMP NULL NULL,
|
||||
user_id TEXT REFERENCES "User" (id),
|
||||
post_id TEXT REFERENCES "Post" (id),
|
||||
user_source_id CHAR(25) REFERENCES "UserSource" (id)
|
||||
);
|
||||
|
||||
CREATE TABLE "post_tags"
|
||||
(
|
||||
post_id TEXT REFERENCES "Post" (id),
|
||||
|
Loading…
Reference in New Issue
Block a user