Huge refactor, submission system addition & security improvements. +Implementation of moderation cmds.
This commit is contained in:
15
migrations/004_punishments.sql
Normal file
15
migrations/004_punishments.sql
Normal file
@@ -0,0 +1,15 @@
|
||||
CREATE TABLE punishments (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
chat_id INTEGER NOT NULL,
|
||||
target_user_id INTEGER NOT NULL,
|
||||
action_type TEXT NOT NULL, -- 'ban', 'mute', 'kick'
|
||||
duration_seconds INTEGER, -- NULL = permanent
|
||||
reason TEXT,
|
||||
created_by INTEGER NOT NULL,
|
||||
created_at TEXT NOT NULL DEFAULT (datetime('now')),
|
||||
revoked_at TEXT,
|
||||
revoked_by INTEGER,
|
||||
active INTEGER NOT NULL DEFAULT 1
|
||||
);
|
||||
CREATE INDEX idx_punishments_chat_target ON punishments(chat_id, target_user_id);
|
||||
CREATE INDEX idx_punishments_active ON punishments(active);
|
||||
Reference in New Issue
Block a user