From b9cc3e8e72c56d0c62d52071afc1eb8b7b82cf17 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Wed, 8 Jul 2015 15:05:13 -0300 Subject: [PATCH] Bug 3206: DBRev 3.21.00.014 Signed-off-by: Tomas Cohen Arazi --- Koha.pm | 2 +- .../bug_XXXX-add_OAI-PMH_DeletedRecord_syspref.sql | 3 --- installer/data/mysql/updatedatabase.pl | 13 +++++++++++++ 3 files changed, 14 insertions(+), 4 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_XXXX-add_OAI-PMH_DeletedRecord_syspref.sql diff --git a/Koha.pm b/Koha.pm index 15114f55c3..746a751b54 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 = "3.21.00.013"; +$VERSION = "3.21.00.014"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/bug_XXXX-add_OAI-PMH_DeletedRecord_syspref.sql b/installer/data/mysql/atomicupdate/bug_XXXX-add_OAI-PMH_DeletedRecord_syspref.sql deleted file mode 100644 index 233bcbeed6..0000000000 --- a/installer/data/mysql/atomicupdate/bug_XXXX-add_OAI-PMH_DeletedRecord_syspref.sql +++ /dev/null @@ -1,3 +0,0 @@ -INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) -VALUES ('OAI-PMH:DeletedRecord','persistent','Koha\'s deletedbiblio table will never be deleted (persistent) or might be deleted (transient)','transient|persistent','Choice'); -ALTER TABLE oai_sets_biblios DROP FOREIGN KEY oai_sets_biblios_ibfk_1; diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 0ada58c112..a04d784047 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -10675,6 +10675,19 @@ if ( CheckVersion($DBversion) ) { SetVersion ($DBversion); } +$DBversion = "3.21.00.014"; +if ( CheckVersion($DBversion) ) { + $dbh->do(q{ + INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) + VALUES ('OAI-PMH:DeletedRecord','persistent','Koha\'s deletedbiblio table will never be deleted (persistent) or might be deleted (transient)','transient|persistent','Choice') + }); + $dbh->do(q| + ALTER TABLE oai_sets_biblios DROP FOREIGN KEY oai_sets_biblios_ibfk_1 + |); + print "Upgrade to $DBversion done (Bug 3206: OAI repository deleted record support)\n"; + SetVersion ($DBversion); +} + # DEVELOPER PROCESS, search for anything to execute in the db_update directory # SEE bug 13068 # if there is anything in the atomicupdate, read and execute it. -- 2.39.2