add: questions, requests

This commit is contained in:
trisua 2025-04-12 22:25:54 -04:00
parent 24f67221ca
commit 7960484bf9
52 changed files with 1698 additions and 100 deletions

View file

@ -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");

View 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
)

View 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
)

View file

@ -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
)