CREATE TABLE IF NOT EXISTS public."PublicKeys"
(
    "Timestamp" timestamp without time zone NOT NULL DEFAULT now(),
    "UserID" character varying COLLATE pg_catalog."default" NOT NULL,
    "PublicKey" text COLLATE pg_catalog."default" NOT NULL,
    CONSTRAINT "PublicKeys_pkey" PRIMARY KEY ("Timestamp", "UserID"),
    CONSTRAINT "PublicKeyUserID" FOREIGN KEY ("UserID")
        REFERENCES public.users ("UserID") MATCH SIMPLE
        ON UPDATE NO ACTION
        ON DELETE NO ACTION
)

TABLESPACE pg_default;

ALTER TABLE IF EXISTS public."PublicKeys"
    OWNER to postgres;

COMMENT ON TABLE public."PublicKeys"
    IS 'Public Key Storage for Signatures';