Календарь: история действий с отменой для админа
This commit is contained in:
+14
@@ -896,3 +896,17 @@ CREATE TABLE IF NOT EXISTS calendar_reminder_sent (
|
||||
UNIQUE (event_id, user_id, occurrence_at, minutes)
|
||||
);
|
||||
CREATE INDEX IF NOT EXISTS idx_calendar_reminder_sent_sent_at ON calendar_reminder_sent(sent_at);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS calendar_action_log (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
event_ids INT[] NOT NULL DEFAULT '{}',
|
||||
user_id INT REFERENCES users(id) ON DELETE SET NULL,
|
||||
user_name VARCHAR(200) NOT NULL DEFAULT '',
|
||||
action VARCHAR(30) NOT NULL,
|
||||
title VARCHAR(500) NOT NULL DEFAULT '',
|
||||
before_state JSONB NOT NULL DEFAULT '[]'::jsonb,
|
||||
after_state JSONB NOT NULL DEFAULT '[]'::jsonb,
|
||||
created_at TIMESTAMPTZ NOT NULL DEFAULT now()
|
||||
);
|
||||
CREATE INDEX IF NOT EXISTS idx_calendar_action_log_created ON calendar_action_log(id DESC);
|
||||
CREATE INDEX IF NOT EXISTS idx_calendar_action_log_user ON calendar_action_log(user_id, id DESC);
|
||||
|
||||
Reference in New Issue
Block a user