diff --git a/src/integrations/supabase/types.ts b/src/integrations/supabase/types.ts index de10033..356c9b7 100644 --- a/src/integrations/supabase/types.ts +++ b/src/integrations/supabase/types.ts @@ -29,6 +29,7 @@ export type Database = { telegram_first_message_received_at: string | null telegram_onboarding_completed: boolean telegram_token_invalid: boolean + telegram_user_chat_id: number | null telegram_webhook_configured: boolean telegram_webhook_secret: string | null updated_at: string @@ -51,6 +52,7 @@ export type Database = { telegram_first_message_received_at?: string | null telegram_onboarding_completed?: boolean telegram_token_invalid?: boolean + telegram_user_chat_id?: number | null telegram_webhook_configured?: boolean telegram_webhook_secret?: string | null updated_at?: string @@ -73,6 +75,7 @@ export type Database = { telegram_first_message_received_at?: string | null telegram_onboarding_completed?: boolean telegram_token_invalid?: boolean + telegram_user_chat_id?: number | null telegram_webhook_configured?: boolean telegram_webhook_secret?: string | null updated_at?: string diff --git a/supabase/migrations/20260423175706_a7a12e6f-11fb-4972-9606-1f87b453c684.sql b/supabase/migrations/20260423175706_a7a12e6f-11fb-4972-9606-1f87b453c684.sql new file mode 100644 index 0000000..5b9d081 --- /dev/null +++ b/supabase/migrations/20260423175706_a7a12e6f-11fb-4972-9606-1f87b453c684.sql @@ -0,0 +1,2 @@ +ALTER TABLE public.agent_instances ADD COLUMN IF NOT EXISTS telegram_user_chat_id bigint; +COMMENT ON COLUMN public.agent_instances.telegram_user_chat_id IS 'Chat ID do Telegram do dono do agente — populado pelo telegram-webhook na primeira mensagem. Usado em TELEGRAM_ALLOWED_USERS / TELEGRAM_HOME_CHANNEL no container Hermes.'; \ No newline at end of file