
CREATE TABLE mailing_lists
(
    id NUMBER(19) PRIMARY KEY NOT NULL,
    title varchar2(225),
    project_id NUMBER(19) references projects(id),
    add_by varchar2(225),
    deleted NUMBER(1),
    total_recipients NUMBER(19),
    channel_ids varchar2(4000),
    created_at timestamp with time zone NOT NULL,
    updated_at timestamp with time zone NOT NULL,
    deleted_at timestamp with time zone
);

CREATE SEQUENCE mailing_lists_id_seq;

CREATE INDEX mailing_lists_mailing_lists_title_mailing_lists_project_id ON mailing_lists(title, project_id);
