owpengram-server/deploy/migrations/0007_read_history_events.down.sql
2026-06-04 01:37:39 +08:00

15 lines
463 B
SQL

ALTER TABLE update_events
DROP CONSTRAINT IF EXISTS update_events_peer_type_check;
ALTER TABLE update_events
DROP CONSTRAINT IF EXISTS update_events_type_check;
ALTER TABLE update_events
ADD CONSTRAINT update_events_type_check
CHECK (event_type IN ('new_message'));
ALTER TABLE update_events
DROP COLUMN IF EXISTS still_unread_count,
DROP COLUMN IF EXISTS max_id,
DROP COLUMN IF EXISTS peer_id,
DROP COLUMN IF EXISTS peer_type;