8 lines
251 B
SQL
8 lines
251 B
SQL
|
|
-- Soft-delete for War Room messages
|
||
|
|
ALTER TABLE warroom_messages
|
||
|
|
ADD COLUMN IF NOT EXISTS deleted_at TIMESTAMPTZ;
|
||
|
|
|
||
|
|
CREATE INDEX IF NOT EXISTS warroom_messages_room_deleted
|
||
|
|
ON warroom_messages (room_id, deleted_at)
|
||
|
|
WHERE deleted_at IS NOT NULL;
|