Bumping db version
authorChris Cormack <chrisc@catalyst.net.nz>
Wed, 12 Oct 2011 21:22:34 +0000 (10:22 +1300)
committerChris Cormack <chrisc@catalyst.net.nz>
Wed, 12 Oct 2011 21:22:34 +0000 (10:22 +1300)
installer/data/mysql/updatedatabase.pl
kohaversion.pl

index 8c0930b..12e67e1 100755 (executable)
@@ -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)
index 106b18f..8a0257a 100644 (file)
@@ -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