From 1072b9267641ab3e51ab5b63319d1d0a2033cae7 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 24 Jul 2014 13:26:29 +0200 Subject: [PATCH] Bug 12648: Link patrons to an order - DB changes This patch inserts the new notification template into the letters table. It also add the insert statements into the language specific files. Signed-off-by: Paola Rossi Amended patch: Add the kohastructure.sql changes Signed-off-by: Tomas Cohen Arazi --- .../mysql/de-DE/mandatory/sample_notices.sql | 3 +++ .../mysql/en/mandatory/sample_notices.sql | 3 +++ .../mysql/es-ES/mandatory/sample_notices.sql | 4 ++++ .../fr-FR/1-Obligatoire/sample_notices.sql | 3 +++ .../data/mysql/it-IT/necessari/notices.sql | 3 +++ installer/data/mysql/kohastructure.sql | 12 +++++++++++ .../nb-NO/1-Obligatorisk/sample_notices.sql | 3 +++ .../mysql/pl-PL/mandatory/sample_notices.sql | 3 +++ .../mysql/ru-RU/mandatory/sample_notices.sql | 3 +++ .../mysql/uk-UA/mandatory/sample_notices.sql | 3 +++ installer/data/mysql/updatedatabase.pl | 20 +++++++++++++++++++ 11 files changed, 60 insertions(+) diff --git a/installer/data/mysql/de-DE/mandatory/sample_notices.sql b/installer/data/mysql/de-DE/mandatory/sample_notices.sql index 01ae5d4f61..5afc4194d8 100644 --- a/installer/data/mysql/de-DE/mandatory/sample_notices.sql +++ b/installer/data/mysql/de-DE/mandatory/sample_notices.sql @@ -131,3 +131,6 @@ Wir möchten Sie darüber informieren, dass der Benutzer <> Vielen Dank, Ihr Biblioheksteam' ); + +INSERT INTO letter(module, code, branchcode, name, title, content, message_transport_type) +VALUES ('acquisition', 'ACQ_NOTIF_ON_RECEIV', '', 'Notification on receiving', 'Order received', 'Dear <> <>,\n\n The order <> (<>) has been received.\n\nYour library.', 'email') diff --git a/installer/data/mysql/en/mandatory/sample_notices.sql b/installer/data/mysql/en/mandatory/sample_notices.sql index 228173971c..378be05bf2 100644 --- a/installer/data/mysql/en/mandatory/sample_notices.sql +++ b/installer/data/mysql/en/mandatory/sample_notices.sql @@ -142,3 +142,6 @@ Thank you. Your library.' ); + +INSERT INTO letter(module, code, branchcode, name, title, content, message_transport_type) +VALUES ('acquisition', 'ACQ_NOTIF_ON_RECEIV', '', 'Notification on receiving', 'Order received', 'Dear <> <>,\n\n The order <> (<>) has been received.\n\nYour library.', 'email') diff --git a/installer/data/mysql/es-ES/mandatory/sample_notices.sql b/installer/data/mysql/es-ES/mandatory/sample_notices.sql index b105f587b3..3d0ca998f0 100644 --- a/installer/data/mysql/es-ES/mandatory/sample_notices.sql +++ b/installer/data/mysql/es-ES/mandatory/sample_notices.sql @@ -143,3 +143,7 @@ Thank you. Your library.' ); + + +INSERT INTO letter(module, code, branchcode, name, title, content, message_transport_type) +VALUES ('acquisition', 'ACQ_NOTIF_ON_RECEIV', '', 'Notification on receiving', 'Order received', 'Dear <> <>,\n\n The order <> (<>) has been received.\n\nYour library.', 'email') diff --git a/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql b/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql index d66a2d4fb3..9fd43a7259 100644 --- a/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql +++ b/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql @@ -145,3 +145,6 @@ Thank you. Your library.' ); + +INSERT INTO letter(module, code, branchcode, name, title, content, message_transport_type) +VALUES ('acquisition', 'ACQ_NOTIF_ON_RECEIV', '', 'Notification on receiving', 'Order received', 'Dear <> <>,\n\n The order <> (<>) has been received.\n\nYour library.', 'email') diff --git a/installer/data/mysql/it-IT/necessari/notices.sql b/installer/data/mysql/it-IT/necessari/notices.sql index 626f2080f7..c74df45a5d 100644 --- a/installer/data/mysql/it-IT/necessari/notices.sql +++ b/installer/data/mysql/it-IT/necessari/notices.sql @@ -142,3 +142,6 @@ Grazie di tutto Lo staff della biblioteca.' ); + +INSERT INTO letter(module, code, branchcode, name, title, content, message_transport_type) +VALUES ('acquisition', 'ACQ_NOTIF_ON_RECEIV', '', 'Notification on receiving', 'Order received', 'Dear <> <>,\n\n The order <> (<>) has been received.\n\nYour library.', 'email') diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 08ef9ee70b..5e04530da9 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -3088,6 +3088,18 @@ CREATE TABLE `aqorders` ( -- information related to the basket line items CONSTRAINT `aqorders_subscriptionid` FOREIGN KEY (`subscriptionid`) REFERENCES `subscription` (`subscriptionid`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +-- +-- Table structure for table `aqorderusers` +-- + +DROP TABLE IF EXISTS `aqorderusers`; +CREATE TABLE aqorderusers ( + ordernumber int(11) NOT NULL, + borrowernumber int(11) NOT NULL, + PRIMARY KEY (ordernumber, borrowernumber), + CONSTRAINT aqorderusers_ibfk_1 FOREIGN KEY (ordernumber) REFERENCES aqorders (ordernumber) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT aqorderusers_ibfk_2 FOREIGN KEY (borrowernumber) REFERENCES borrowers (borrowernumber) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Table structure for table `aqorders_items` diff --git a/installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql b/installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql index f1e8fb0dfc..cb40756f49 100644 --- a/installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql +++ b/installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql @@ -163,3 +163,6 @@ Thank you. Your library.' ); + +INSERT INTO letter(module, code, branchcode, name, title, content, message_transport_type) +VALUES ('acquisition', 'ACQ_NOTIF_ON_RECEIV', '', 'Notification on receiving', 'Order received', 'Dear <> <>,\n\n The order <> (<>) has been received.\n\nYour library.', 'email') diff --git a/installer/data/mysql/pl-PL/mandatory/sample_notices.sql b/installer/data/mysql/pl-PL/mandatory/sample_notices.sql index 228173971c..378be05bf2 100644 --- a/installer/data/mysql/pl-PL/mandatory/sample_notices.sql +++ b/installer/data/mysql/pl-PL/mandatory/sample_notices.sql @@ -142,3 +142,6 @@ Thank you. Your library.' ); + +INSERT INTO letter(module, code, branchcode, name, title, content, message_transport_type) +VALUES ('acquisition', 'ACQ_NOTIF_ON_RECEIV', '', 'Notification on receiving', 'Order received', 'Dear <> <>,\n\n The order <> (<>) has been received.\n\nYour library.', 'email') diff --git a/installer/data/mysql/ru-RU/mandatory/sample_notices.sql b/installer/data/mysql/ru-RU/mandatory/sample_notices.sql index a8d3046979..ff767c2780 100644 --- a/installer/data/mysql/ru-RU/mandatory/sample_notices.sql +++ b/installer/data/mysql/ru-RU/mandatory/sample_notices.sql @@ -145,3 +145,6 @@ Thank you. Your library.' ); + +INSERT INTO letter(module, code, branchcode, name, title, content, message_transport_type) +VALUES ('acquisition', 'ACQ_NOTIF_ON_RECEIV', '', 'Notification on receiving', 'Order received', 'Dear <> <>,\n\n The order <> (<>) has been received.\n\nYour library.', 'email') diff --git a/installer/data/mysql/uk-UA/mandatory/sample_notices.sql b/installer/data/mysql/uk-UA/mandatory/sample_notices.sql index db8976ed23..547a3f799c 100644 --- a/installer/data/mysql/uk-UA/mandatory/sample_notices.sql +++ b/installer/data/mysql/uk-UA/mandatory/sample_notices.sql @@ -144,3 +144,6 @@ Thank you. Your library.' ); + +INSERT INTO letter(module, code, branchcode, name, title, content, message_transport_type) +VALUES ('acquisition', 'ACQ_NOTIF_ON_RECEIV', '', 'Notification on receiving', 'Order received', 'Dear <> <>,\n\n The order <> (<>) has been received.\n\nYour library.', 'email') diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index bd39629b33..184927ddb1 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -9804,6 +9804,26 @@ if ( CheckVersion($DBversion) ) { SetVersion($DBversion); } +$DBversion = "3.19.00.XXX"; +if ( CheckVersion($DBversion) ) { + $dbh->do(q| + CREATE TABLE aqorderusers ( + ordernumber int(11) NOT NULL, + borrowernumber int(11) NOT NULL, + PRIMARY KEY (ordernumber, borrowernumber), + CONSTRAINT aqorderusers_ibfk_1 FOREIGN KEY (ordernumber) REFERENCES aqorders (ordernumber) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT aqorderusers_ibfk_2 FOREIGN KEY (borrowernumber) REFERENCES borrowers (borrowernumber) ON DELETE CASCADE ON UPDATE CASCADE + ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; + |); + + $dbh->do(q| + INSERT INTO letter(module, code, branchcode, name, title, content, message_transport_type) + VALUES ('acquisition', 'ACQ_NOTIF_ON_RECEIV', '', 'Notification on receiving', 'Order received', 'Dear <> <>,\n\n The order <> (<>) has been received.\n\nYour library.', 'email') + |); + print "Upgrade to $DBversion done (Bug 12648: Add letter ACQ_NOTIF_ON_RECEIV )\n"; + SetVersion ($DBversion); +} + =head1 FUNCTIONS =head2 TableExists($table) -- 2.39.5