owpengram-server/deploy/migrations/0111_bot_api_polling_state.up.sql
A bf965f610c feat: sync bot keyboards and callbacks
Sync telesrv b96f2dd (feat(bot): complete keyboards callbacks and durable delivery).

Skipped private docs and preserved public README files per sync rules; normalized the appearance seed log label for public naming.
2026-07-19 20:38:48 +08:00

12 lines
455 B
SQL

ALTER TABLE public.bot_api_update_states
ADD COLUMN allowed_updates text[],
ADD COLUMN cursor_initialized boolean NOT NULL DEFAULT false;
ALTER TABLE public.bot_api_update_states
ADD CONSTRAINT bot_api_update_states_allowed_updates_check CHECK (
allowed_updates IS NULL
OR array_position(allowed_updates, NULL) IS NULL
);
CREATE INDEX bot_api_updates_created_retention_idx
ON public.bot_api_updates (created_at, id);