
CREATE TABLE mailing_lists
(
    id bigint PRIMARY KEY NOT NULL IDENTITY(1,1) ,
    title nvarchar(225),
    project_id bigint references projects(id),
    add_by nvarchar(225),
    deleted BIT,
    total_recipients bigint,
    channel_ids nvarchar(4000),
    created_at DATETIMEOFFSET NOT NULL,
    updated_at DATETIMEOFFSET NOT NULL,
    deleted_at DATETIMEOFFSET
);

CREATE INDEX mailing_lists_mailing_lists_title_mailing_lists_project_id ON mailing_lists(title, project_id);
