feat(database): added additional columns
added more columns BREAKING-CHANGE: breaks database compatibility to older SDK versions
This commit is contained in:
parent
c2ab455d3e
commit
e62280a416
@ -79,16 +79,12 @@ CREATE TABLE "TagGroup"
|
|||||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
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"
|
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),
|
user_id TEXT REFERENCES "User" (id),
|
||||||
source_id TEXT REFERENCES "Source" (id),
|
source_id TEXT REFERENCES "Source" (id),
|
||||||
scrape_time_interval INT,
|
scrape_time_interval INT,
|
||||||
@ -97,10 +93,20 @@ CREATE TABLE "UserSource"
|
|||||||
last_scrape_time TIMESTAMP,
|
last_scrape_time TIMESTAMP,
|
||||||
account_validate BOOL DEFAULT FALSE,
|
account_validate BOOL DEFAULT FALSE,
|
||||||
account_validation_key CHAR(25),
|
account_validation_key CHAR(25),
|
||||||
PRIMARY KEY (user_id, source_id),
|
|
||||||
UNIQUE (source_id, account_username, account_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"
|
CREATE TABLE "post_tags"
|
||||||
(
|
(
|
||||||
post_id TEXT REFERENCES "Post" (id),
|
post_id TEXT REFERENCES "Post" (id),
|
||||||
|
Loading…
Reference in New Issue
Block a user