From dd05abf911b89d7adbc44c7b9299dd22be1ef35b Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 15 Oct 2020 10:53:25 +0000 Subject: [PATCH] Bug 25460: DBRev 20.06.00.052 Signed-off-by: Jonathan Druart --- Koha.pm | 2 +- ...oai-PMH:AutoUpdateSetsEmbedItemData_syspref.perl | 9 --------- installer/data/mysql/updatedatabase.pl | 13 +++++++++++++ 3 files changed, 14 insertions(+), 10 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_25460-add_oai-PMH:AutoUpdateSetsEmbedItemData_syspref.perl diff --git a/Koha.pm b/Koha.pm index 9dbea75e7b..023b5bc921 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 = "20.06.00.051"; +$VERSION = "20.06.00.052"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/bug_25460-add_oai-PMH:AutoUpdateSetsEmbedItemData_syspref.perl b/installer/data/mysql/atomicupdate/bug_25460-add_oai-PMH:AutoUpdateSetsEmbedItemData_syspref.perl deleted file mode 100644 index 7798c5c6d3..0000000000 --- a/installer/data/mysql/atomicupdate/bug_25460-add_oai-PMH:AutoUpdateSetsEmbedItemData_syspref.perl +++ /dev/null @@ -1,9 +0,0 @@ -$DBversion = 'XXX'; -if ( CheckVersion($DBversion) ) { - $dbh->do(q{INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type) VALUES ('OAI-PMH:AutoUpdateSetEmbedItemData', '0', '', 'Embed item information when automatically updating OAI sets. Requires OAI-PMH:AutoUpdateSets syspref to be enabled', 'YesNo') }); - - $dbh->do(q{ UPDATE systempreferences SET explanation = 'Automatically update OAI sets when a bibliographic or item record is created or updated' WHERE variable = 'OAI-PMH:AutoUpdateSets' }); - - SetVersion( $DBversion ); - print "Upgrade to $DBversion done (Bug 25460 - Update OAI set when adding/editing/deleting item records)\n"; -} diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index f475dabe9a..5595c22381 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -23056,6 +23056,19 @@ if( CheckVersion( $DBversion ) ) { NewVersion( $DBversion, 12556, "Add new syspref HoldsNeedProcessingSIP"); } +$DBversion = '20.06.00.052'; +if ( CheckVersion($DBversion) ) { + $dbh->do(q{ + INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type) VALUES ('OAI-PMH:AutoUpdateSetEmbedItemData', '0', '', 'Embed item information when automatically updating OAI sets. Requires OAI-PMH:AutoUpdateSets syspref to be enabled', 'YesNo') + }); + + $dbh->do(q{ + UPDATE systempreferences SET explanation = 'Automatically update OAI sets when a bibliographic or item record is created or updated' WHERE variable = 'OAI-PMH:AutoUpdateSets' + }); + + NewVersion( $DBversion, 25460, "Update OAI set when adding/editing/deleting item records" ); +} + # 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