--- notifications

create table notifications (
    id bigint primary key,
    "type" varchar not null,
    user_id bigint references users(id),

    target_violation_id bigint references target_violations(id),

    created_at timestamptz not null
);

create sequence notifications_id_seq;
create index notifications_user_ix on notifications(user_id, created_at);
