CREATE TABLE IF NOT EXISTS public.refreshtoken
(
    id bigint NOT NULL GENERATED ALWAYS AS IDENTITY ( INCREMENT 1 START 1 MINVALUE 1 MAXVALUE 9223372036854775807 CACHE 1 ),
    user_id bigint NOT NULL,
    token character varying COLLATE pg_catalog."default" NOT NULL,
    expiry_date timestamp with time zone,
    CONSTRAINT refreshtoken_pkey PRIMARY KEY (id),
    CONSTRAINT "FK_refreshtoken_users" FOREIGN KEY (user_id)
        REFERENCES public.users (id) MATCH SIMPLE
        ON UPDATE NO ACTION
        ON DELETE NO ACTION
);
