From 7a69d53642eb2e2d0274a8afb65953d8a30daa94 Mon Sep 17 00:00:00 2001 From: alexm Date: Tue, 24 May 2022 14:50:33 +0200 Subject: [PATCH 1/2] fix(changes): add reference table --- db/changes/10451-april/00-invoiceOut_queue.sql | 14 -------------- .../00-ClientUnpaid.sql | 2 +- db/changes/10461-mother/00-invoiceOut_queue.sql | 8 ++++++++ 3 files changed, 9 insertions(+), 15 deletions(-) delete mode 100644 db/changes/10451-april/00-invoiceOut_queue.sql rename db/changes/{10451-april => 10461-mother}/00-ClientUnpaid.sql (87%) create mode 100644 db/changes/10461-mother/00-invoiceOut_queue.sql diff --git a/db/changes/10451-april/00-invoiceOut_queue.sql b/db/changes/10451-april/00-invoiceOut_queue.sql deleted file mode 100644 index f60bcab77..000000000 --- a/db/changes/10451-april/00-invoiceOut_queue.sql +++ /dev/null @@ -1,14 +0,0 @@ -create table `vn`.`invoiceOut_queue` -( - invoiceFk int(10) unsigned not null, - queued datetime default now() not null, - printed datetime null, - `status` VARCHAR(50) default '' null, - constraint invoiceOut_queue_pk - primary key (invoiceFk), - constraint invoiceOut_queue_invoiceOut_id_fk - foreign key (invoiceFk) references invoiceOut (id) - on update cascade on delete cascade -) - comment 'Queue for PDF invoicing'; - diff --git a/db/changes/10451-april/00-ClientUnpaid.sql b/db/changes/10461-mother/00-ClientUnpaid.sql similarity index 87% rename from db/changes/10451-april/00-ClientUnpaid.sql rename to db/changes/10461-mother/00-ClientUnpaid.sql index d84fe494a..9b30bb8fc 100644 --- a/db/changes/10451-april/00-ClientUnpaid.sql +++ b/db/changes/10461-mother/00-ClientUnpaid.sql @@ -3,7 +3,7 @@ CREATE TABLE `vn`.`clientUnpaid` ( `dated` date NOT NULL, `amount` double DEFAULT 0, PRIMARY KEY (`clientFk`), - CONSTRAINT `clientUnpaid_clientFk` FOREIGN KEY (`clientFk`) REFERENCES `client` (`id`) ON UPDATE CASCADE + CONSTRAINT `clientUnpaid_clientFk` FOREIGN KEY (`clientFk`) REFERENCES `vn`.`client` (`id`) ON UPDATE CASCADE ); INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) diff --git a/db/changes/10461-mother/00-invoiceOut_queue.sql b/db/changes/10461-mother/00-invoiceOut_queue.sql new file mode 100644 index 000000000..013e3b784 --- /dev/null +++ b/db/changes/10461-mother/00-invoiceOut_queue.sql @@ -0,0 +1,8 @@ +CREATE TABLE `vn`.`invoiceOut_queue` ( + `invoiceFk` int(10) unsigned not null, + `queued` datetime default now() not null, + `printed` datetime null, + `status` VARCHAR(50) DEFAULT '' NULL, + CONSTRAINT `invoiceOut_queue_pk` PRIMARY KEY (`invoiceFk`), + CONSTRAINT `invoiceOut_queue_invoiceOut_id_fk` FOREIGN KEY (`invoiceFk`) REFERENCES `vn`.`invoiceOut` (`id`) ON UPDATE CASCADE ON DELETE CASCADE +) comment 'Queue for PDF invoicing'; \ No newline at end of file From 47ab4fc2c111b97daa6df244ef85c6762b691232 Mon Sep 17 00:00:00 2001 From: alexm Date: Tue, 24 May 2022 14:52:26 +0200 Subject: [PATCH 2/2] intro --- db/changes/10461-mother/00-ClientUnpaid.sql | 2 +- db/changes/10461-mother/00-invoiceOut_queue.sql | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/db/changes/10461-mother/00-ClientUnpaid.sql b/db/changes/10461-mother/00-ClientUnpaid.sql index 9b30bb8fc..16deedace 100644 --- a/db/changes/10461-mother/00-ClientUnpaid.sql +++ b/db/changes/10461-mother/00-ClientUnpaid.sql @@ -7,4 +7,4 @@ CREATE TABLE `vn`.`clientUnpaid` ( ); INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) - VALUES('ClientUnpaid', '*', '*', 'ALLOW', 'ROLE', 'administrative'); \ No newline at end of file + VALUES('ClientUnpaid', '*', '*', 'ALLOW', 'ROLE', 'administrative'); diff --git a/db/changes/10461-mother/00-invoiceOut_queue.sql b/db/changes/10461-mother/00-invoiceOut_queue.sql index 013e3b784..2b9f45e0f 100644 --- a/db/changes/10461-mother/00-invoiceOut_queue.sql +++ b/db/changes/10461-mother/00-invoiceOut_queue.sql @@ -5,4 +5,4 @@ CREATE TABLE `vn`.`invoiceOut_queue` ( `status` VARCHAR(50) DEFAULT '' NULL, CONSTRAINT `invoiceOut_queue_pk` PRIMARY KEY (`invoiceFk`), CONSTRAINT `invoiceOut_queue_invoiceOut_id_fk` FOREIGN KEY (`invoiceFk`) REFERENCES `vn`.`invoiceOut` (`id`) ON UPDATE CASCADE ON DELETE CASCADE -) comment 'Queue for PDF invoicing'; \ No newline at end of file +) comment 'Queue for PDF invoicing';