From d205c2795799821bfb560109b841eafac7b239b1 Mon Sep 17 00:00:00 2001 From: Chris Cormack Date: Thu, 13 Oct 2011 10:22:34 +1300 Subject: [PATCH] Bumping db version --- installer/data/mysql/updatedatabase.pl | 46 +++++++++++++------------- kohaversion.pl | 2 +- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 8c0930b8fc..12e67e1806 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -4445,29 +4445,6 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { SetVersion($DBversion); } -$DBversion = '3.05.00.XXX'; -if (C4::Context->preference("Version") < TransformToNum($DBversion)) { - $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('EasyAnalyticalRecords','0','If on, display in the catalogue screens tools to easily setup analytical record relationships','','YesNo');"); - print "Upgrade to $DBversion done (Add EasyAnalyticalRecords syspref)\n"; - SetVersion ($DBversion); -} - -$DBversion = '3.05.00.XXX'; -if (C4::Context->preference("Version") < TransformToNum($DBversion)) { - if (C4::Context->preference("marcflavour") eq 'MARC21' || - C4::Context->preference("marcflavour") eq 'NORMARC'){ - $dbh->do("INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian`, `libopac`, `repeatable`, `mandatory`, `kohafield`, `tab`, `authorised_value` , `authtypecode`, `value_builder`, `isurl`, `hidden`, `frameworkcode`, `seealso`, `link`, `defaultvalue`) VALUES ('773', '0', 'Host Biblionumber', 'Host Biblionumber', 0, 0, NULL, 7, NULL, NULL, '', NULL, -6, '', '', '', NULL)"); - $dbh->do("INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian`, `libopac`, `repeatable`, `mandatory`, `kohafield`, `tab`, `authorised_value` , `authtypecode`, `value_builder`, `isurl`, `hidden`, `frameworkcode`, `seealso`, `link`, `defaultvalue`) VALUES ('773', '9', 'Host Itemnumber', 'Host Itemnumber', 0, 0, NULL, 7, NULL, NULL, '', NULL, -6, '', '', '', NULL)"); - print "Upgrade to $DBversion done (Add 773 subfield 9 and 0 to default framework)\n"; - SetVersion ($DBversion); - } elsif (C4::Context->preference("marcflavour") eq 'UNIMARC'){ - $dbh->do("INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian`, `libopac`, `repeatable`, `mandatory`, `kohafield`, `tab`, `authorised_value` , `authtypecode`, `value_builder`, `isurl`, `hidden`, `frameworkcode`, `seealso`, `link`, `defaultvalue`) VALUES ('461', '9', 'Host Itemnumber', 'Host Itemnumber', 0, 0, NULL, 7, NULL, NULL, '', NULL, -6, '', '', '', NULL)"); - print "Upgrade to $DBversion done (Add 461 subfield 9 to default framework)\n"; - SetVersion ($DBversion); - } - -} - $DBversion = "3.05.00.012"; if (C4::Context->preference("Version") < TransformToNum($DBversion)) { $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('RecordLocalUseOnReturn',0,'If ON, statistically record returns of unissued items as local use, instead of return',NULL,'YesNo')"); @@ -4499,6 +4476,29 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { SetVersion($DBversion); } +$DBversion = '3.05.00.016'; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('EasyAnalyticalRecords','0','If on, display in the catalogue screens tools to easily setup analytical record relationships','','YesNo');"); + print "Upgrade to $DBversion done (Add EasyAnalyticalRecords syspref)\n"; + SetVersion ($DBversion); +} + +$DBversion = '3.05.00.017'; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + if (C4::Context->preference("marcflavour") eq 'MARC21' || + C4::Context->preference("marcflavour") eq 'NORMARC'){ + $dbh->do("INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian`, `libopac`, `repeatable`, `mandatory`, `kohafield`, `tab`, `authorised_value` , `authtypecode`, `value_builder`, `isurl`, `hidden`, `frameworkcode`, `seealso`, `link`, `defaultvalue`) VALUES ('773', '0', 'Host Biblionumber', 'Host Biblionumber', 0, 0, NULL, 7, NULL, NULL, '', NULL, -6, '', '', '', NULL)"); + $dbh->do("INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian`, `libopac`, `repeatable`, `mandatory`, `kohafield`, `tab`, `authorised_value` , `authtypecode`, `value_builder`, `isurl`, `hidden`, `frameworkcode`, `seealso`, `link`, `defaultvalue`) VALUES ('773', '9', 'Host Itemnumber', 'Host Itemnumber', 0, 0, NULL, 7, NULL, NULL, '', NULL, -6, '', '', '', NULL)"); + print "Upgrade to $DBversion done (Add 773 subfield 9 and 0 to default framework)\n"; + SetVersion ($DBversion); + } elsif (C4::Context->preference("marcflavour") eq 'UNIMARC'){ + $dbh->do("INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian`, `libopac`, `repeatable`, `mandatory`, `kohafield`, `tab`, `authorised_value` , `authtypecode`, `value_builder`, `isurl`, `hidden`, `frameworkcode`, `seealso`, `link`, `defaultvalue`) VALUES ('461', '9', 'Host Itemnumber', 'Host Itemnumber', 0, 0, NULL, 7, NULL, NULL, '', NULL, -6, '', '', '', NULL)"); + print "Upgrade to $DBversion done (Add 461 subfield 9 to default framework)\n"; + SetVersion ($DBversion); + } + +} + =head1 FUNCTIONS =head2 DropAllForeignKeys($table) diff --git a/kohaversion.pl b/kohaversion.pl index 106b18f8b5..8a0257a4fe 100644 --- a/kohaversion.pl +++ b/kohaversion.pl @@ -16,7 +16,7 @@ the kohaversion is divided in 4 parts : use strict; sub kohaversion { - our $VERSION = '3.05.00.015'; + our $VERSION = '3.05.00.017'; # version needs to be set this way # so that it can be picked up by Makefile.PL # during install -- 2.39.5