2024-02-13 17:31:01 +01:00
|
|
|
DO $$DECLARE
|
|
|
|
this_version CONSTANT varchar := '00.01.052';
|
|
|
|
BEGIN
|
|
|
|
PERFORM * FROM "DBVersion" WHERE version = this_version;
|
|
|
|
IF FOUND THEN RETURN; END IF;
|
|
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS public."ant_UserCredential"
|
|
|
|
(
|
|
|
|
"id" uuid NOT NULL,
|
|
|
|
"user" uuid NOT NULL,
|
|
|
|
"external_id" character varying(512) COLLATE pg_catalog."default" NOT NULL,
|
|
|
|
"created_at" timestamp without time zone NOT NULL,
|
|
|
|
"updated_at" timestamp without time zone NOT NULL,
|
|
|
|
"is_active" smallint NOT NULL DEFAULT 1,
|
|
|
|
"data" character varying COLLATE pg_catalog."default",
|
|
|
|
CONSTRAINT "ant_UserCredential_pkey" PRIMARY KEY (id),
|
|
|
|
CONSTRAINT "ant_UserCredential_user_fkey" FOREIGN KEY ("user")
|
|
|
|
REFERENCES public."ant_User" (id) MATCH SIMPLE
|
|
|
|
ON UPDATE NO ACTION
|
|
|
|
ON DELETE NO ACTION
|
2024-02-15 17:36:46 +01:00
|
|
|
);
|
2024-02-13 17:31:01 +01:00
|
|
|
|
|
|
|
INSERT INTO public."DBVersion" VALUES ('DMPDB', '00.01.052', '2024-02-13 12:00:00.000000+02', now(), 'Add table ant_UserCredential.');
|
|
|
|
|
|
|
|
END$$;
|