add: channels/messages database functions
chore: bump contrasted
This commit is contained in:
parent
4cafea66aa
commit
a28072be7f
11 changed files with 358 additions and 6 deletions
|
@ -13,3 +13,5 @@ pub const CREATE_TABLE_USER_WARNINGS: &str = include_str!("./sql/create_user_war
|
|||
pub const CREATE_TABLE_REQUESTS: &str = include_str!("./sql/create_requests.sql");
|
||||
pub const CREATE_TABLE_QUESTIONS: &str = include_str!("./sql/create_questions.sql");
|
||||
pub const CREATE_TABLE_IPBLOCKS: &str = include_str!("./sql/create_ipblocks.sql");
|
||||
pub const CREATE_TABLE_CHANNELS: &str = include_str!("./sql/create_channels.sql");
|
||||
pub const CREATE_TABLE_MESSAGES: &str = include_str!("./sql/create_messages.sql");
|
||||
|
|
9
crates/core/src/database/drivers/sql/create_channels.sql
Normal file
9
crates/core/src/database/drivers/sql/create_channels.sql
Normal file
|
@ -0,0 +1,9 @@
|
|||
CREATE TABLE IF NOT EXISTS channels (
|
||||
id BIGINT NOT NULL PRIMARY KEY,
|
||||
community BIGINT NOT NULL,
|
||||
owner BIGINT NOT NULL,
|
||||
created BIGINT NOT NULL,
|
||||
minimum_role_read INT NOT NULL,
|
||||
minimum_role_write INT NOT NULL,
|
||||
position INT NOT NULL
|
||||
)
|
9
crates/core/src/database/drivers/sql/create_messages.sql
Normal file
9
crates/core/src/database/drivers/sql/create_messages.sql
Normal file
|
@ -0,0 +1,9 @@
|
|||
CREATE TABLE IF NOT EXISTS messages (
|
||||
id BIGINT NOT NULL PRIMARY KEY,
|
||||
channel BIGINT NOT NULL,
|
||||
owner BIGINT NOT NULL,
|
||||
created BIGINT NOT NULL,
|
||||
edited BIGINT NOT NULL,
|
||||
content TEXT NOT NULL,
|
||||
context TEXT NOT NULL
|
||||
)
|
Loading…
Add table
Add a link
Reference in a new issue