feat(database): set timezone in migrations
All checks were successful
Gitea Build Check / Build (push) Successful in 2m33s
All checks were successful
Gitea Build Check / Build (push) Successful in 2m33s
This commit is contained in:
parent
b3ebc23b09
commit
8d47b94dcb
@ -21,9 +21,9 @@ CREATE TABLE "Post"
|
|||||||
(
|
(
|
||||||
id CHAR(25) PRIMARY KEY,
|
id CHAR(25) PRIMARY KEY,
|
||||||
rating Rating,
|
rating Rating,
|
||||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
created_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP,
|
||||||
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
updated_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP,
|
||||||
deleted_at TIMESTAMP NULL NULL
|
deleted_at TIMESTAMP WITH TIME ZONE NULL NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE "Source"
|
CREATE TABLE "Source"
|
||||||
@ -32,26 +32,26 @@ CREATE TABLE "Source"
|
|||||||
display_name TEXT NULL,
|
display_name TEXT NULL,
|
||||||
icon TEXT NULL,
|
icon TEXT NULL,
|
||||||
domain TEXT NOT NULL UNIQUE,
|
domain TEXT NOT NULL UNIQUE,
|
||||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
created_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP,
|
||||||
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
updated_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP,
|
||||||
deleted_at TIMESTAMP NULL
|
deleted_at TIMESTAMP WITH TIME ZONE NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE "Tag"
|
CREATE TABLE "Tag"
|
||||||
(
|
(
|
||||||
name TEXT PRIMARY KEY,
|
name TEXT PRIMARY KEY,
|
||||||
tag_type TagType,
|
tag_type TagType,
|
||||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
created_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP,
|
||||||
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
updated_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP,
|
||||||
deleted_at TIMESTAMP NULL
|
deleted_at TIMESTAMP WITH TIME ZONE NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE "User"
|
CREATE TABLE "User"
|
||||||
(
|
(
|
||||||
id TEXT PRIMARY KEY,
|
id TEXT PRIMARY KEY,
|
||||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
created_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP,
|
||||||
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
updated_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP,
|
||||||
deleted_at TIMESTAMP NULL
|
deleted_at TIMESTAMP WITH TIME ZONE NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE "PostReference"
|
CREATE TABLE "PostReference"
|
||||||
@ -70,22 +70,22 @@ CREATE TABLE "TagAlias"
|
|||||||
(
|
(
|
||||||
name TEXT PRIMARY KEY,
|
name TEXT PRIMARY KEY,
|
||||||
tag_id TEXT REFERENCES "Tag" (name),
|
tag_id TEXT REFERENCES "Tag" (name),
|
||||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
created_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE "TagGroup"
|
CREATE TABLE "TagGroup"
|
||||||
(
|
(
|
||||||
name TEXT PRIMARY KEY,
|
name TEXT PRIMARY KEY,
|
||||||
tag_id TEXT REFERENCES "Tag" (name),
|
tag_id TEXT REFERENCES "Tag" (name),
|
||||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
created_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE "UserSource"
|
CREATE TABLE "UserSource"
|
||||||
(
|
(
|
||||||
id CHAR(25) PRIMARY KEY,
|
id CHAR(25) PRIMARY KEY,
|
||||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
created_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP,
|
||||||
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
updated_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP,
|
||||||
deleted_at TIMESTAMP NULL NULL,
|
deleted_at TIMESTAMP WITH TIME ZONE 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 TEXT,
|
scrape_time_interval TEXT,
|
||||||
@ -100,9 +100,9 @@ CREATE TABLE "UserSource"
|
|||||||
CREATE TABLE "UserFavorites"
|
CREATE TABLE "UserFavorites"
|
||||||
(
|
(
|
||||||
id CHAR(25) PRIMARY KEY,
|
id CHAR(25) PRIMARY KEY,
|
||||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
created_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP,
|
||||||
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
updated_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP,
|
||||||
deleted_at TIMESTAMP NULL NULL,
|
deleted_at TIMESTAMP WITH TIME ZONE NULL NULL,
|
||||||
user_id TEXT REFERENCES "User" (id),
|
user_id TEXT REFERENCES "User" (id),
|
||||||
post_id TEXT REFERENCES "Post" (id),
|
post_id TEXT REFERENCES "Post" (id),
|
||||||
user_source_id CHAR(25) REFERENCES "UserSource" (id)
|
user_source_id CHAR(25) REFERENCES "UserSource" (id)
|
||||||
|
Loading…
Reference in New Issue
Block a user