Diesel migrations
This commit is contained in:
3
migrations/2022-11-04-174746_create_warnings/down.sql
Normal file
3
migrations/2022-11-04-174746_create_warnings/down.sql
Normal file
@ -0,0 +1,3 @@
|
||||
-- This file should undo anything in `up.sql`
|
||||
|
||||
DROP TABLE warnings
|
12
migrations/2022-11-04-174746_create_warnings/up.sql
Normal file
12
migrations/2022-11-04-174746_create_warnings/up.sql
Normal file
@ -0,0 +1,12 @@
|
||||
-- Your SQL goes here
|
||||
create TABLE warnings (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
chat_id BIGINT REFERENCES chats(id) NOT NULL,
|
||||
user_from BIGINT REFERENCES users(id) NOT NULL,
|
||||
user_to BIGINT REFERENCES users(id) NOT NULL,
|
||||
reason TEXT,
|
||||
message_id BIGINT,
|
||||
message_text TEXT,
|
||||
created TIMESTAMPTZ NOT NULL DEFAULT NOW(),
|
||||
active BOOLEAN NOT NULL DEFAULT TRUE
|
||||
)
|
Reference in New Issue
Block a user