koha-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-cvs] koha/updater updatedatabase [rel_3_0]


From: Antoine Farnault
Subject: [Koha-cvs] koha/updater updatedatabase [rel_3_0]
Date: Mon, 16 Oct 2006 09:47:08 +0000

CVSROOT:        /sources/koha
Module name:    koha
Branch:         rel_3_0
Changes by:     Antoine Farnault <toins>        06/10/16 09:47:08

Modified files:
        updater        : updatedatabase 

Log message:
        Moving branches.branchecode from varchar(4) to varchar(10).
        Moving itemtypes.itemtype from varchar(4) to varchar(10).
        Moving categories.categoryode from varchar(2) to varchar(10)
        sorting modified 's tables.
        Fix: key=>'PRIMARY KEY' to key => 'PRI'.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/updater/updatedatabase?cvsroot=koha&only_with_tag=rel_3_0&r1=1.157.2.7&r2=1.157.2.8

Patches:
Index: updatedatabase
===================================================================
RCS file: /sources/koha/koha/updater/updatedatabase,v
retrieving revision 1.157.2.7
retrieving revision 1.157.2.8
diff -u -b -r1.157.2.7 -r1.157.2.8
--- updatedatabase      11 Oct 2006 15:22:23 -0000      1.157.2.7
+++ updatedatabase      16 Oct 2006 09:47:08 -0000      1.157.2.8
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-# $Id: updatedatabase,v 1.157.2.7 2006/10/11 15:22:23 tipaul Exp $
+# $Id: updatedatabase,v 1.157.2.8 2006/10/16 09:47:08 toins Exp $
 
 # Database Updater
 # This script checks for required updates to the database.
@@ -363,16 +363,6 @@
 #             default => ''
 #         },
 #     ],
-       serial => [
-        {
-            field   => 'notes',
-            type    => 'TEXT',
-            null    => 'NULL',
-            key     => '',
-            default => '',
-            extra   => ''
-        },
-    ],
        aqbasket =>  [
                {
                        field   => 'booksellerid',
@@ -421,25 +411,6 @@
                },
        ],
        
-       
-       issues =>  [
-               {
-                       field   => 'borrowernumber',
-                       type    => 'int(11)',
-                       null    => 'NULL', # can be null when a borrower is 
deleted and the foreign key rule executed
-                       key             => '',
-                       default => '',
-                       extra   => '',
-               },
-               {
-                       field   => 'itemnumber',
-                       type    => 'int(11)',
-                       null    => 'NULL', # can be null when a borrower is 
deleted and the foreign key rule executed
-                       key             => '',
-                       default => '',
-                       extra   => '',
-               },
-       ],
        borrowers => [
                {       field => 'firstname',
                        type => 'text',
@@ -514,6 +485,69 @@
                },
        ],
        
+       biblioitems =>  [
+               {
+                       field   => 'lcsort',
+                       type    => 'varchar(25)',
+                       null    => 'NULL',
+                       key             => '',
+                       default => '',
+                       extra   => '',
+               },
+               {
+                       field   => 'ccode',
+                       type    => 'varchar(4)',
+                       null    => 'NULL',
+                       key             => '',
+                       default => '',
+                       extra   => '',
+               },
+    ],
+       branches =>  [
+               {
+                       field   => 'branchip',
+                       type    => 'varchar(15)',
+                       null    => 'NULL',
+                       key             => '',
+                       default => '',
+                       extra   => '',
+               },
+               {
+                       field   => 'branchprinter',
+                       type    => 'varchar(100)',
+                       null    => 'NULL',
+                       key             => '',
+                       default => '',
+                       extra   => '',
+               },
+               {
+                   field   => 'branchcode',
+                   type    => 'varchar(10)',
+                   null    => 'NOT NULL',
+                   default => '',
+                   extra   => '',
+               }
+       ],
+       
+       categories =>  [
+               {
+                       field   => 'category_type',
+                       type    => 'char(1)',
+                       null    => 'NOT NULL',
+                       key             => '',
+                       default => 'A',
+                       extra   => '',
+               },
+               {
+                   field   => 'categorycode',
+                   type    => 'varchar(10)',
+                   null    => 'not null',
+                   key     => '',
+                   default => '',
+                   extra   => '',
+               },
+       ],
+       
        deletedborrowers => [
                {       field => 'firstname',
                        type => 'text',
@@ -588,86 +622,78 @@
                },
        ],
        
-       branches =>  [
+       issues =>  [
                {
-                       field   => 'branchip',
-                       type    => 'varchar(15)',
-                       null    => 'NULL',
+                       field   => 'borrowernumber',
+                       type    => 'int(11)',
+                       null    => 'NULL', # can be null when a borrower is 
deleted and the foreign key rule executed
                        key             => '',
                        default => '',
                        extra   => '',
                },
                {
-                       field   => 'branchprinter',
-                       type    => 'varchar(100)',
-                       null    => 'NULL',
+                       field   => 'itemnumber',
+                       type    => 'int(11)',
+                       null    => 'NULL', # can be null when a borrower is 
deleted and the foreign key rule executed
                        key             => '',
                        default => '',
                        extra   => '',
                },
        ],
-       categories =>  [
-               {
-                       field   => 'category_type',
-                       type    => 'char(1)',
-                       null    => 'NOT NULL',
-                       key             => '',
-                       default => 'A',
-                       extra   => '',
-               },
-       ],
-       reserves =>  [
+       
+    items => [
                {
-                       field   => 'waitingdate',
+                       field   => 'onloan',
                        type    => 'date',
                        null    => 'NULL',
                        key             => '',
-                       default => '',
+                       default => '0000-00-00',
                        extra   => '',
                },
-       ],
-       biblioitems =>  [
                {
-                       field   => 'lcsort',
-                       type    => 'varchar(25)',
+                       field   => 'cutterextra',
+                       type    => 'varchar(45)',
                        null    => 'NULL',
                        key             => '',
                        default => '',
                        extra   => '',
                },
                {
-                       field   => 'ccode',
-                       type    => 'varchar(4)',
+                       field   => 'issue_date',
+                       type    => 'date',
                        null    => 'NULL',
                        key             => '',
                        default => '',
                        extra   => '',
                },
     ],
-    items => [
+       itemtypes => [
                {
-                       field   => 'onloan',
-                       type    => 'date',
-                       null    => 'NULL',
+               field  => 'itemtype',
+               type   => 'varchar(10)',
+               null   => 'NOT NULL',
                        key             => '',
-                       default => '0000-00-00',
-                       extra   => '',
-               },
+               extra  => 'UNIQUE',
+           }
+       ],
+       reserves =>  [
                {
-                       field   => 'cutterextra',
-                       type    => 'varchar(45)',
+                       field   => 'waitingdate',
+                       type    => 'date',
                        null    => 'NULL',
                        key             => '',
                        default => '',
                        extra   => '',
                },
+       ],
+       serial => [
                {
-                       field   => 'issue_date',
-                       type    => 'date',
+            field   => 'notes',
+            type    => 'TEXT',
                        null    => 'NULL',
                        key             => '',
                        default => '',
-                       extra   => '',
+            extra   => ''
                },
        ],
        systempreferences =>  [
@@ -719,7 +745,7 @@
        aqbooksellers => [
                {       indexname => 'PRIMARY',
                        content => 'id',
-                       type => 'PRIMARY',
+                       type => 'PRI',
                }
        ],
        aqbasket => [
@@ -743,9 +769,30 @@
        currency => [
                {       indexname => 'PRIMARY',
                        content => 'currency',
-                       type => 'PRIMARY',
+                       type => 'PRI',
+               }
+       ],
+       categories => [
+           {
+               indexname => 'categorycode',
+               content   => 'categorycode',
+               type      => 'PRI',
+           }
+       ],
+       itemtypes => [
+           {
+               indexname => 'itemtype',
+               content   => 'itemtype',
+               type => 'PRI',
                }
        ],
+       branches => [
+           {
+               indexname => 'branchcode',
+               content   => 'branchcode',
+               type      => 'PRI',
+           }
+       ]
 );
 
 my %foreign_keys = (
@@ -1790,6 +1837,13 @@
 exit;
 
 # $Log: updatedatabase,v $
+# Revision 1.157.2.8  2006/10/16 09:47:08  toins
+# Moving branches.branchecode from varchar(4) to varchar(10).
+# Moving itemtypes.itemtype from varchar(4) to varchar(10).
+# Moving categories.categoryode from varchar(2) to varchar(10)
+# sorting modified 's tables.
+# Fix: key=>'PRIMARY KEY' to key => 'PRI'.
+#
 # Revision 1.157.2.7  2006/10/11 15:22:23  tipaul
 # - adding some missing fields, coming from dev_week :
 # * lcsort & ccode in biblioitems table. lcsort is used for loc callnumbers & 
ccode is used to have a item level circulation rules. Ccode means C<irc>code




reply via email to

[Prev in Thread] Current Thread [Next in Thread]