Adding some new fields to biblioitems:
[koha_fer] / updater / updatedatabase
index bccb5e3..26606ed 100755 (executable)
@@ -52,21 +52,6 @@ $|=1; # flushes output
 
 # Tables to add if they don't exist
 my %requiretables = (
-    categorytable       => "(categorycode char(5) NOT NULL default '',
-                             description text default '',
-                             itemtypecodes text default '',
-                             PRIMARY KEY (categorycode)
-                            )",
-    subcategorytable       => "(subcategorycode char(5) NOT NULL default '',
-                             description text default '',
-                             itemtypecodes text default '',
-                             PRIMARY KEY (subcategorycode)
-                            )",
-    mediatypetable       => "(mediatypecode char(5) NOT NULL default '',
-                             description text default '',
-                             itemtypecodes text default '',
-                             PRIMARY KEY (mediatypecode)
-                            )",
     action_logs     => "(
                     `timestamp` TIMESTAMP NOT NULL ,
                     `user` INT( 11 ) NOT NULL ,
@@ -175,10 +160,6 @@ my %requiretables = (
                             datereviewed datetime,
                             PRIMARY KEY (reviewid)
                             )",
-    borrowers_to_borrowers  => "(
-                            borrower1 integer,
-                            borrower2 integer
-                            )",
     subscriptionroutinglist=>"(
                              routingid integer NOT NULL auto_increment,
                              borrowernumber integer,
@@ -428,7 +409,7 @@ my %tabledata = (
             value               => '1',
             forceupdate         => { 'explanation' => 1,
                                      'type' => 1},
-            explanation         => 'Enable / Disable cloud link on OPAC',
+            explanation         => 'Enable / Disable cloud link on OPAC (Require to run misc/cronjobs/build_browser_and_cloud.pl on the server)',
             type                => 'YesNo',
         },
        {
@@ -437,7 +418,7 @@ my %tabledata = (
             value               => '1',
             forceupdate         => { 'explanation' => 1,
                                      'type' => 1},
-            explanation         => 'Enable/Disable browser link on OPAC (needs to set misc/cronjob/build_browser.pl)',
+            explanation         => 'Enable/Disable browser link on OPAC (Require to run misc/cronjobs/build_browser_and_cloud.pl on the server)',
             type                => 'YesNo',
         },
        {
@@ -538,6 +519,14 @@ my %tabledata = (
             explanation         => "Enter a specific hash for NoZebra indexes. Enter : 'indexname' => '100a,245a,500*','index2' => '...'",
             type                => 'Free',
         },
+        {
+            uniquefieldrequired => 'variable',
+            variable            => 'uppercasesurnames',
+            value               => '0',
+            forceupdate         => {'explanation' => 1, 'type' => 1},
+            explanation         => "Force Surnames to be uppercase",
+            type                => 'YesNo',
+        },
     ],
     userflags => [
         {
@@ -566,7 +555,7 @@ my %tabledata = (
         {
             uniquefieldrequired => 'id',
             category            => 'SUGGEST',
-            authorised_value    => 'Not enoug budget',
+            authorised_value    => 'Not enough budget',
             lib                 => 'This book it too much expensive',
         }
     ],
@@ -596,7 +585,7 @@ my %fielddefinitions = (
             field    => 'id',
             type    => 'int(11)',
             null    => 'NOT NULL',
-            key        => '',
+            key        => 'PRI',
             default    => '',
             extra    => 'auto_increment',
         },
@@ -743,6 +732,65 @@ my %fielddefinitions = (
             default    => '',
             extra    => '',
         },
+        {
+            field   => 'dewey',
+            type    => 'varchar(30)',
+            null    => 'null',
+            default => '',
+            extra   => '',
+        },
+        {
+            field   => 'publicationyear',
+            type    => 'text',
+            null    => 'null',
+            default => '',
+            extra   => '',
+        },
+        {
+            field   => 'collectiontitle',
+            type    => 'mediumtext',
+            null    => 'null',
+            default => '',
+            extra   => '',
+        },
+        {
+            field   => 'collectionissn',
+            type    => 'mediumtext',
+            null    => 'null',
+            default => '',
+            extra   => '',
+        },
+        {
+            field   => 'collectionvolume',
+            type    => 'mediumtext',
+            null    => 'null',
+            default => '',
+            extra   => '',
+        },
+        {
+            field   => 'editionstatement',
+            type    => 'text',
+            null    => 'null',
+            default => '',
+            extra   => '',
+        },
+        {
+            field   => 'editionresponsability',
+            type    => 'text',
+            null    => 'null',
+            default => '',
+            extra   => '',
+        },
+              
+    ],
+    deletedbiblioitems => [
+        {
+            field   => 'dewey',
+            type    => 'varchar(30)',
+            null    => 'null',
+            default => '',
+            extra   => '',
+        },
     ],
     branches =>  [
         {
@@ -941,6 +989,14 @@ my %fielddefinitions = (
             extra    => '',
         },
         {
+            field    => 'homebranch',
+            type    => 'varchar(10)',
+            null    => 'NULL',
+            key        => '',
+            default    => '',
+            extra    => '',
+        },
+        {
             field    => 'holdingbranch',
             type    => 'varchar(10)',
             null    => 'NULL',
@@ -974,6 +1030,15 @@ my %fielddefinitions = (
             extra  => '',
         },
     ],
+    marc_breeding => [
+        {
+            field => 'marc',
+            type  => 'LONGBLOB',
+            null  => 'NULL',
+            key    => '',
+            extra  => '',
+        }
+    ],
     marc_subfield_structure => [
         {
             field => 'defaultvalue',
@@ -2034,6 +2099,33 @@ $sth->finish;
 exit;
 
 # $Log$
+# Revision 1.172  2007/07/19 10:21:22  hdl
+# Adding some new fields to biblioitems:
+# collectiontitle
+# collectionissn
+# collectionvolume
+#
+#
+# Changing publicationyear to text.
+#
+# Revision 1.171  2007/07/02 02:30:16  rangi
+# Fix for bug 1296, making surnames uppercase a systems preference
+#
+# Revision 1.170  2007/06/26 13:25:37  tipaul
+# removing some useless tables from updatedatabase
+#
+# Revision 1.169  2007/06/26 09:23:26  tipaul
+# improving OpacBrowser systempref explanation
+#
+# Revision 1.168  2007/06/25 15:02:31  tipaul
+# missing field declaration
+#
+# Revision 1.167  2007/06/15 13:09:08  toins
+# bugfix : bibliotitems.dewey & deletedbiblioitems.dewey mustn't be double(8,6).
+#
+# Revision 1.166  2007/06/08 09:40:12  toins
+# bug fix : items.homebranch must be VARCHAR(10)
+#
 # Revision 1.165  2007/05/23 16:33:10  tipaul
 # skip move to innoDB for the 4 22 tables, that are used to store MARC records, are useless in Koha 3.0 The process is very very long, so the updatedatabase should speed up a lot (by long I mean 1 hour on my Dual core with SCSI disk, for a 50 000 biblios long table
 #