-- Your SQL goes here

CREATE TABLE public.verify
(
    "user" integer NOT NULL,
    token text NOT NULL,
    sent timestamp(0) without time zone NOT NULL DEFAULT now()::timestamp,
    PRIMARY KEY ("user"),
    UNIQUE (token),
    FOREIGN KEY ("user")
        REFERENCES public."user" (id) MATCH SIMPLE
        ON UPDATE CASCADE
        ON DELETE CASCADE
        NOT VALID
);

ALTER TABLE IF EXISTS public."user"
    ADD COLUMN verified boolean NOT NULL DEFAULT false;