From a1fb46f70c21bf40ed2258735662524c9dae2895 Mon Sep 17 00:00:00 2001 From: Lucas Tettamanti <757326+lkzwieder@users.noreply.github.com> Date: Fri, 2 Jan 2026 00:21:27 -0300 Subject: [PATCH] tenant_channels migration --- db/migrations/20260102031918_tenant_channels.sql | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 db/migrations/20260102031918_tenant_channels.sql diff --git a/db/migrations/20260102031918_tenant_channels.sql b/db/migrations/20260102031918_tenant_channels.sql new file mode 100644 index 0000000..e73bc47 --- /dev/null +++ b/db/migrations/20260102031918_tenant_channels.sql @@ -0,0 +1,11 @@ +-- migrate:up +create table if not exists tenant_channels ( + tenant_id uuid not null references tenants(id) on delete cascade, + channel_type text not null, -- 'whatsapp' + channel_key text not null, -- e.g. '+5491122334455' or 'PHONE_NUMBER_ID' + created_at timestamptz not null default now(), + primary key (channel_type, channel_key) +); + +-- migrate:down +drop table if exists tenant_channels;