9 lines
541 B
SQL
9 lines
541 B
SQL
ALTER TABLE plugin_telegram_contexts
|
|
ADD COLUMN IF NOT EXISTS message_id bigint NOT NULL DEFAULT 0,
|
|
ADD COLUMN IF NOT EXISTS chat_type text NOT NULL DEFAULT 'private',
|
|
ADD COLUMN IF NOT EXISTS inbound_media jsonb NOT NULL DEFAULT '[]'::jsonb;
|
|
|
|
ALTER TABLE plugin_telegram_sends DROP CONSTRAINT IF EXISTS plugin_telegram_sends_action_check;
|
|
ALTER TABLE plugin_telegram_sends ADD CONSTRAINT plugin_telegram_sends_action_check
|
|
CHECK (action IN ('send_message','send_photo','send_document','resend_inbound_media','bot_api','chat_api'));
|