--- notifications

create table notifications (
    id bigint primary key identity(1, 1),
    [type] nvarchar(255) not null,
    user_id bigint references users(id),

    target_violation_id bigint references target_violations(id),

    created_at datetimeoffset not null
);

create index notifications_user_ix on notifications(user_id, created_at);
