You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
synctv/migrations/20260818001_add_room_visibi...

10 lines
342 B
SQL

ALTER TABLE rooms
ADD COLUMN IF NOT EXISTS is_public BOOLEAN NOT NULL DEFAULT TRUE;
ALTER TABLE room_creation_requests
ADD COLUMN IF NOT EXISTS is_public BOOLEAN NOT NULL DEFAULT TRUE;
CREATE INDEX IF NOT EXISTS idx_rooms_public_last_activity
ON rooms(last_activity_at DESC, id DESC)
WHERE deleted_at IS NULL AND is_public;