add: questions, requests
This commit is contained in:
parent
24f67221ca
commit
7960484bf9
52 changed files with 1698 additions and 100 deletions
|
@ -10,3 +10,5 @@ pub const CREATE_TABLE_IPBANS: &str = include_str!("./sql/create_ipbans.sql");
|
|||
pub const CREATE_TABLE_AUDIT_LOG: &str = include_str!("./sql/create_audit_log.sql");
|
||||
pub const CREATE_TABLE_REPORTS: &str = include_str!("./sql/create_reports.sql");
|
||||
pub const CREATE_TABLE_USER_WARNINGS: &str = include_str!("./sql/create_user_warnings.sql");
|
||||
pub const CREATE_TABLE_REQUESTS: &str = include_str!("./sql/create_requests.sql");
|
||||
pub const CREATE_TABLE_QUESTIONS: &str = include_str!("./sql/create_questions.sql");
|
||||
|
|
10
crates/core/src/database/drivers/sql/create_questions.sql
Normal file
10
crates/core/src/database/drivers/sql/create_questions.sql
Normal file
|
@ -0,0 +1,10 @@
|
|||
CREATE TABLE IF NOT EXISTS questions (
|
||||
id BIGINT NOT NULL PRIMARY KEY,
|
||||
created BIGINT NOT NULL,
|
||||
owner BIGINT NOT NULL,
|
||||
receiver BIGINT NOT NULL,
|
||||
content TEXT NOT NULL,
|
||||
is_global INT NOT NULL,
|
||||
answer_count INT NOT NULL,
|
||||
community BIGINT NOT NULL
|
||||
)
|
7
crates/core/src/database/drivers/sql/create_requests.sql
Normal file
7
crates/core/src/database/drivers/sql/create_requests.sql
Normal file
|
@ -0,0 +1,7 @@
|
|||
CREATE TABLE IF NOT EXISTS requests (
|
||||
id BIGINT NOT NULL PRIMARY KEY,
|
||||
created BIGINT NOT NULL,
|
||||
owner BIGINT NOT NULL,
|
||||
action_type TEXT NOT NULL,
|
||||
linked_asset BIGINT NOT NULL
|
||||
)
|
|
@ -11,5 +11,9 @@ CREATE TABLE IF NOT EXISTS users (
|
|||
notification_count INT NOT NULL,
|
||||
follower_count INT NOT NULL,
|
||||
following_count INT NOT NULL,
|
||||
last_seen BIGINT NOT NULL
|
||||
last_seen BIGINT NOT NULL,
|
||||
totp TEXT NOT NULL,
|
||||
recovery_codes TEXT NOT NULL,
|
||||
post_count INT NOT NULL,
|
||||
request_count INT NOT NULL
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue