From cdf786b0aa0dc1d9fed489335fcfb0bf2cf9ea43 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Tue, 5 May 2020 11:14:49 +0100 Subject: [PATCH] Bug 24163: DBRev 19.12.00.086 Signed-off-by: Martin Renvoize --- Koha.pm | 2 +- .../data/mysql/atomicupdate/bug_24163.perl | 18 ------------------ installer/data/mysql/updatedatabase.pl | 19 +++++++++++++++++++ 3 files changed, 20 insertions(+), 19 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_24163.perl diff --git a/Koha.pm b/Koha.pm index c776504e61..cafbd9676c 100644 --- a/Koha.pm +++ b/Koha.pm @@ -29,7 +29,7 @@ use vars qw{ $VERSION }; # - #4 : the developer version. The 4th number is the database subversion. # used by developers when the database changes. updatedatabase take care of the changes itself # and is automatically called by Auth.pm when needed. -$VERSION = "19.12.00.085"; +$VERSION = "19.12.00.086"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/bug_24163.perl b/installer/data/mysql/atomicupdate/bug_24163.perl deleted file mode 100644 index 6488cdfe8e..0000000000 --- a/installer/data/mysql/atomicupdate/bug_24163.perl +++ /dev/null @@ -1,18 +0,0 @@ -$DBversion = 'XXX'; # will be replaced by the RM -if( CheckVersion( $DBversion ) ) { - $dbh->do(q{ - INSERT IGNORE INTO export_format( profile, description, content, csv_separator, type, used_for ) VALUES - ("Late orders (CSV profile)", "Default CSV export for late orders", 'Title[% separator %]Author[% separator %]Publication year[% separator %]ISBN[% separator %]Quantity[% separator %]Number of claims - [% FOR order IN orders ~%] - [%~ SET biblio = order.biblio ~%] - "[% biblio.title %]"[% separator ~%] - "[% biblio.author %]"[% separator ~%] - "[% bibio.biblioitem.publicationyear %]"[% separator ~%] - "[% biblio.biblioitem.isbn %]"[% separator ~%] - "[% order.quantity%]"[% separator ~%] - "[% order.claims.count%][% IF order.claims.count %]([% FOR c IN order.claims %][% c.claimed_on | $KohaDates %][% UNLESS loop.last %], [% END %][% END %])[% END %]" - [% END %]', ",", "sql", "late_orders") - }); - SetVersion( $DBversion ); - print "Upgrade to $DBversion done (Bug 24163 - Define a default CSV profile for late orders)\n"; -} diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index f9732b83dc..6dfc067908 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -22028,6 +22028,25 @@ if( CheckVersion( $DBversion ) ) { NewVersion( $DBversion, 24161, "Add new join table aqorders_claims to keep track of claims"); } +$DBversion = '19.12.00.086'; +if( CheckVersion( $DBversion ) ) { + $dbh->do(q{ + INSERT IGNORE INTO export_format( profile, description, content, csv_separator, type, used_for ) VALUES + ("Late orders (CSV profile)", "Default CSV export for late orders", 'Title[% separator %]Author[% separator %]Publication year[% separator %]ISBN[% separator %]Quantity[% separator %]Number of claims + [% FOR order IN orders ~%] + [%~ SET biblio = order.biblio ~%] + "[% biblio.title %]"[% separator ~%] + "[% biblio.author %]"[% separator ~%] + "[% bibio.biblioitem.publicationyear %]"[% separator ~%] + "[% biblio.biblioitem.isbn %]"[% separator ~%] + "[% order.quantity%]"[% separator ~%] + "[% order.claims.count%][% IF order.claims.count %]([% FOR c IN order.claims %][% c.claimed_on | $KohaDates %][% UNLESS loop.last %], [% END %][% END %])[% END %]" + [% END %]', ",", "sql", "late_orders") + }); + + NewVersion( $DBversion, 24163, "Define a default CSV profile for late orders"); +} + # SEE bug 13068 # if there is anything in the atomicupdate, read and execute it. my $update_dir = C4::Context->config('intranetdir') . '/installer/data/mysql/atomicupdate/'; -- 2.39.5