--- autoreply-groups

create table autoreply_groups (
    id bigint primary key identity (1, 1),
    project_id bigint not null references projects(id),
    title nvarchar(255) not null,
    channel_ids nvarchar(4000) not null,
    deleted bit not null,

    created_at datetimeoffset not null,
    updated_at datetimeoffset not null,
    deleted_at datetimeoffset
);

create index autoreply_groups_project_ix 
on autoreply_groups(project_id);

---

alter table autoreplies add group_id bigint references autoreply_groups(id);
