Files
khb_microservices/packages/khb_common/migrations/013_project_channel.sql
2026-10-15 19:16:19 +03:00

12 lines
590 B
SQL

-- Проектные каналы Slack: канал привязан к проекту (объекту стройки) JobTread, поэтому проект в общении не уточняется.
create table if not exists project_channel (
channel_id text primary key,
jt_job_id text not null,
channel_name text,
is_enabled boolean not null default true,
note text,
created_at timestamptz not null default now()
);
create index if not exists project_channel_job_idx on project_channel (jt_job_id);
alter table project_channel enable row level security;