CREATE TABLE public.users (
    id         bigint      NOT NULL,
    email      text        NOT NULL,
    deleted_at timestamptz
);

CREATE UNIQUE INDEX users_email_active ON public.users (email) WHERE deleted_at IS NULL;
