fix sql script order

This commit is contained in:
Efstratios Giannopoulos 2024-04-04 18:27:18 +03:00
parent 399efde673
commit f7aaa04c0c
7 changed files with 27 additions and 27 deletions

View File

@ -1,5 +1,5 @@
DO $$DECLARE
this_version CONSTANT varchar := '00.01.029';
this_version CONSTANT varchar := '00.01.028';
BEGIN
PERFORM * FROM "DBVersion" WHERE version = this_version;
IF FOUND THEN RETURN; END IF;
@ -26,6 +26,6 @@ BEGIN
ON DELETE NO ACTION
);
INSERT INTO public."DBVersion" VALUES ('DMPDB', '00.01.029', '2023-12-05 12:00:00.000000+02', now(), 'Add table QueueOutbox.');
INSERT INTO public."DBVersion" VALUES ('DMPDB', '00.01.028', '2023-12-05 12:00:00.000000+02', now(), 'Add table QueueOutbox.');
END$$;

View File

@ -1,5 +1,5 @@
DO $$DECLARE
this_version CONSTANT varchar := '00.01.030';
this_version CONSTANT varchar := '00.01.029';
BEGIN
PERFORM * FROM "DBVersion" WHERE version = this_version;
IF FOUND THEN RETURN; END IF;
@ -27,6 +27,6 @@ BEGIN
NOT VALID
);
INSERT INTO public."DBVersion" VALUES ('DMPDB', '00.01.030', '2023-12-05 12:00:00.000000+02', now(), 'Add table QueueInbox.');
INSERT INTO public."DBVersion" VALUES ('DMPDB', '00.01.029', '2023-12-05 12:00:00.000000+02', now(), 'Add table QueueInbox.');
END$$;

View File

@ -1,5 +1,5 @@
DO $$DECLARE
this_version CONSTANT varchar := '00.01.031';
this_version CONSTANT varchar := '00.01.030';
BEGIN
PERFORM * FROM "DBVersion" WHERE version = this_version;
IF FOUND THEN RETURN; END IF;
@ -30,6 +30,6 @@ BEGIN
ON DELETE NO ACTION
);
INSERT INTO public."DBVersion" VALUES ('DMPDB', '00.01.031', '2023-12-05 12:00:00.000000+02', now(), 'Add tables ntf_Tenant and ntf_TenantConfiguration.');
INSERT INTO public."DBVersion" VALUES ('DMPDB', '00.01.030', '2023-12-05 12:00:00.000000+02', now(), 'Add tables ntf_Tenant and ntf_TenantConfiguration.');
END$$;

View File

@ -1,5 +1,5 @@
DO $$DECLARE
this_version CONSTANT varchar := '00.01.032';
this_version CONSTANT varchar := '00.01.031';
BEGIN
PERFORM * FROM "DBVersion" WHERE version = this_version;
IF FOUND THEN RETURN; END IF;
@ -15,6 +15,6 @@ BEGIN
CONSTRAINT "Ntf_User_pkey" PRIMARY KEY (id)
);
INSERT INTO public."DBVersion" VALUES ('DMPDB', '00.01.032', '2024-01-24 12:00:00.000000+02', now(), 'Add table ntf_User.');
INSERT INTO public."DBVersion" VALUES ('DMPDB', '00.01.031', '2024-01-24 12:00:00.000000+02', now(), 'Add table ntf_User.');
END$$;

View File

@ -1,5 +1,5 @@
DO $$DECLARE
this_version CONSTANT varchar := '00.01.028';
this_version CONSTANT varchar := '00.01.032';
BEGIN
PERFORM * FROM "DBVersion" WHERE version = this_version;
IF FOUND THEN RETURN; END IF;
@ -35,6 +35,6 @@ BEGIN
ON DELETE NO ACTION
);
INSERT INTO public."DBVersion" VALUES ('DMPDB', '00.01.028', '2023-12-05 12:00:00.000000+02', now(), 'Add table ntf_Notification.');
INSERT INTO public."DBVersion" VALUES ('DMPDB', '00.01.032', '2023-12-05 12:00:00.000000+02', now(), 'Add table ntf_Notification.');
END$$;

View File

@ -21,7 +21,7 @@ BEGIN
is_active smallint NOT NULL,
CONSTRAINT "ntf_InAppNotification_pkey" PRIMARY KEY (id),
CONSTRAINT "ntf_InAppNotification_tenant_fkey" FOREIGN KEY (tenant)
REFERENCES public."ntf_tenant" (id) MATCH SIMPLE
REFERENCES public."ntf_Tenant" (id) MATCH SIMPLE
ON UPDATE NO ACTION
ON DELETE NO ACTION,
CONSTRAINT "ntf_InAppNotification_user_fkey" FOREIGN KEY ("user")

File diff suppressed because one or more lines are too long