bugfix (NOTE : this bugs makes installation of the 1.3.3 a little fuzzy. Please fix...
[koha-ffzg.git] / updater / updatedatabase
1 #!/usr/bin/perl
2
3 # $Id$
4
5 # Database Updater
6 # This script checks for required updates to the database.
7
8 # Part of the Koha Library Software www.koha.org
9 # Licensed under the GPL.
10
11 # Bugs/ToDo:
12 # - Would also be a good idea to offer to do a backup at this time...
13
14 # NOTE:  If you do something more than once in here, make it table driven.
15
16 use strict;
17
18 # CPAN modules
19 use DBI;
20
21 # Koha modules
22 use C4::Context("/etc/koha.conf.tmp");
23         # FIXME - /etc/koha.conf might not exist, so shouldn't use
24         # C4::Context.
25
26 # FIXME - The user might be installing a new database, so can't rely
27 # on /etc/koha.conf anyway.
28
29 my $debug=0;
30
31 my (
32         $sth, $sti,
33         $query,
34         %existingtables,        # tables already in database
35         %types,
36         $table,
37         $column,
38         $type, $null, $key, $default, $extra,
39         $prefitem,              # preference item in systempreferences table
40 );
41
42 my $dbh = C4::Context->dbh;
43
44 #-------------------
45 # Defines
46
47 # Tables to add if they don't exist
48 my %requiretables=(
49     shelfcontents=>"( shelfnumber int not null,
50                                                         itemnumber int not null,
51                                                         flags int)",
52     bookshelf=>"( shelfnumber int auto_increment primary key,
53                                                 shelfname char(255))",
54     z3950queue=>"( id int auto_increment primary key,
55                                                 term text,
56                                                 type char(10),
57                                                 startdate int,
58                                                 enddate int,
59                                                 done smallint,
60                                                 results longblob,
61                                                 numrecords int,
62                                                 servers text,
63                                                 identifier char(30))",
64         z3950results=>"( id int auto_increment primary key,
65                                                 queryid int,
66                                                 server char(255),
67                                                 startdate int,
68                                                 enddate int,
69                                                 results longblob,
70                                                 numrecords int,
71                                                 numdownloaded int,
72                                                 highestseen int,
73                                                 active smallint)",
74         branchrelations=>"( branchcode varchar(4),
75                                                         categorycode varchar(4))",
76         websites=>"( websitenumber int(11) NOT NULL auto_increment,
77                                                 biblionumber int(11) NOT NULL default '0',
78                                                 title text,
79                                                 description text,
80                                                 url varchar(255),
81                                                 PRIMARY KEY (websitenumber) )",
82         marcrecorddone=>"( isbn char(40),
83                                                                 issn char(40),
84                                                                 lccn char(40),
85                                                                 controlnumber char(40))",
86     uploadedmarc=>"( id int(11) NOT NULL auto_increment PRIMARY KEY,
87                                                         marc longblob,
88                                                         hidden smallint(6) default NULL,
89                                                         name varchar(255) default NULL)",
90         ethnicity=>"( code varchar(10) NOT NULL default '',
91                                         name varchar(255) default NULL,
92                                         PRIMARY KEY  (code)   )",
93         sessions=>"( sessionID varchar(255) NOT NULL default '',
94                                                 userid varchar(255) default NULL,
95                                                 ip varchar(16) default NULL,
96                                                 lasttime int,
97                                                 PRIMARY KEY (sessionID)   )",
98     sessionqueries=>"( sessionID varchar(255) NOT NULL default '',
99                                                                 userid char(100) NOT NULL default '',
100                                                                 ip char(18) NOT NULL default '',
101                                                                 url text NOT NULL default ''  )",
102         bibliothesaurus=> "( id bigint(20) NOT NULL auto_increment,
103                                                         freelib char(255) NOT NULL default '',
104                                                         stdlib char(255) NOT NULL default '',
105                                                         category char(10) NOT NULL default '',
106                                                         level tinyint(4) NOT NULL default '1',
107                                                         hierarchy char(80) NOT NULL default '',
108                                                         PRIMARY KEY  (id),
109                                                         KEY freelib (freelib),
110                                                         KEY stdlib (stdlib),
111                                                         KEY category (category),
112                                                         KEY hierarchy (hierarchy)
113                                                         )",
114         marc_biblio => "(
115                                                 bibid bigint(20) unsigned NOT NULL auto_increment,
116                                                 biblionumber int(11) NOT NULL default '0',
117                                                 datecreated date NOT NULL default '0000-00-00',
118                                                 datemodified date default NULL,
119                                                 origincode char(20) default NULL,
120                                                 PRIMARY KEY  (bibid),
121                                                 KEY origincode (origincode),
122                                                 KEY biblionumber (biblionumber)
123                                                 ) ",
124         marc_blob_subfield => "(
125                                         blobidlink bigint(20) NOT NULL auto_increment,
126                                         subfieldvalue longtext NOT NULL,
127                                         PRIMARY KEY  (blobidlink)
128                                         ) ",
129         marc_subfield_structure => "(
130                                                 tagfield char(3) NOT NULL default '',
131                                                 tagsubfield char(1) NOT NULL default '',
132                                                 liblibrarian char(255) NOT NULL default '',
133                                                 libopac char(255) NOT NULL default '',
134                                                 repeatable tinyint(4) NOT NULL default '0',
135                                                 mandatory tinyint(4) NOT NULL default '0',
136                                                 kohafield char(40)  default NULL,
137                                                 tab tinyint(1) default NULL,
138                                                 authorised_value char(10) default NULL,
139                                                 thesaurus_category char(10) default NULL,
140                                                 value_builder char(80) default NULL,
141                                                 PRIMARY KEY  (tagfield,tagsubfield),
142                                                 KEY kohafield (kohafield),
143                                                 KEY tab (tab)
144                                                 )",
145         marc_subfield_table => "(
146                                                 subfieldid bigint(20) unsigned NOT NULL auto_increment,
147                                                 bibid bigint(20) unsigned NOT NULL default '0',
148                                                 tag char(3) NOT NULL default '',
149                                                 tagorder tinyint(4) NOT NULL default '1',
150                                                 tag_indicator char(2) NOT NULL default '',
151                                                 subfieldcode char(1) NOT NULL default '',
152                                                 subfieldorder tinyint(4) NOT NULL default '1',
153                                                 subfieldvalue varchar(255) default NULL,
154                                                 valuebloblink bigint(20) default NULL,
155                                                 PRIMARY KEY  (subfieldid),
156                                                 KEY bibid (bibid),
157                                                 KEY tag (tag),
158                                                 KEY tag_indicator (tag_indicator),
159                                                 KEY subfieldorder (subfieldorder),
160                                                 KEY subfieldcode (subfieldcode),
161                                                 KEY subfieldvalue (subfieldvalue),
162                                                 KEY tagorder (tagorder)
163                                         )",
164         marc_tag_structure => "(
165                                         tagfield char(3) NOT NULL default '',
166                                         liblibrarian char(255) NOT NULL default '',
167                                         libopac char(255) NOT NULL default '',
168                                         repeatable tinyint(4) NOT NULL default '0',
169                                         mandatory tinyint(4) NOT NULL default '0',
170                                         authorised_value char(10) default NULL,
171                                         PRIMARY KEY  (tagfield)
172                                         )",
173         marc_word => "(
174                                 bibid bigint(20) NOT NULL default '0',
175                                 tag char(3) NOT NULL default '',
176                                 tagorder tinyint(4) NOT NULL default '1',
177                                 subfieldid char(1) NOT NULL default '',
178                                 subfieldorder tinyint(4) NOT NULL default '1',
179                                 word varchar(255) NOT NULL default '',
180                                 sndx_word varchar(255) NOT NULL default '',
181                                 KEY bibid (bibid),
182                                 KEY tag (tag),
183                                 KEY tagorder (tagorder),
184                                 KEY subfieldid (subfieldid),
185                                 KEY subfieldorder (subfieldorder),
186                                 KEY word (word),
187                                 KEY sndx_word (sndx_word)
188                         )",
189         marc_breeding =>"( file varchar(80) NOT NULL default '',
190                                                                 isbn varchar(10) NOT NULL default '',
191                                                                 marc text NOT NULL,
192                                                                 PRIMARY KEY  (isbn)
193                                                                 )",
194         authorised_values => "(id int(11) NOT NULL auto_increment,
195                                                                         category char(10) NOT NULL default '',
196                                                                         authorised_value char(80) NOT NULL default '',
197                                                                         lib char(80) NULL,
198                                                                         PRIMARY KEY  (id),
199                                                                         KEY name (category)
200                                                                 )",
201         );
202
203
204 my %requirefields=(
205         biblio=>{ 'abstract' => 'text' },
206         deletedbiblio=>{ 'abstract' => 'text' },
207         biblioitems=>{ 'lccn' => 'char(25)',
208                                                 'url' => 'varchar(255)',
209                                                 'marc' => 'text' },
210         deletedbiblioitems=>{ 'lccn' => 'char(25)',
211                                                                 'url' => 'varchar(255)',
212                                                                 'marc' => 'text' },
213         branchtransfers=>{ 'datearrived' => 'datetime' },
214         statistics=>{'borrowernumber' =>'int(11)'},
215         aqbooksellers=>{'invoicedisc' =>'float(6,4)',
216                                                 'nocalc' => 'int(11)'},
217         borrowers=>{'userid' => 'char(30)',
218                                         'password' => 'char(30)',
219                                         'flags' => 'int(11)'},
220         aqorders=>{'budgetdate' => 'date'},
221         #added so that reference items are not available for reserves...
222         itemtypes=>{'notforloan' => 'smallint(6)'},
223         systempreferences =>{'explanation' => 'char(80)'},
224 );
225
226 my %dropable_table=(
227                     classification   =>'classification',
228                     multipart        =>'multipart',
229                     multivolume      =>'multivolume',
230                     newitems         =>'newitems',
231                     procedures       =>'procedures',
232                     publisher        =>'publisher',
233                     searchstats      =>'searchstats',
234                     serialissues     =>'serialissues',
235                     );
236
237
238 # The tabledata hash contains data that should be in the tables.
239 # The uniquefieldrequired hash entry is used to determine which (if any) fields
240 # must not exist in the table for this row to be inserted.  If the
241 # uniquefieldrequired entry is already in the table, the existing data is not
242 # modified.
243
244 my %tabledata=(
245     userflags => [ 
246         { uniquefieldrequired => 'bit', bit => 0, flag => 'superlibrarian', flagdesc => 'Access to all librarian functions', defaulton => 0 },
247         { uniquefieldrequired => 'bit', bit => 1, flag => 'circulate', flagdesc => 'Circulate books', defaulton => 0 },
248         { uniquefieldrequired => 'bit', bit => 2, flag => 'catalogue', flagdesc => 'View Catalogue (Librarian Interface)', defaulton => 0 },
249         { uniquefieldrequired => 'bit', bit => 3, flag => 'parameters', flagdesc => 'Set Koha system paramters', defaulton => 0 },
250         { uniquefieldrequired => 'bit', bit => 4, flag => 'borrowers', flagdesc => 'Add or modify borrowers', defaulton => 0 },
251         { uniquefieldrequired => 'bit', bit => 5, flag => 'permissions', flagdesc => 'Set user permissions', defaulton => 0 },
252         { uniquefieldrequired => 'bit', bit => 6, flag => 'reserveforothers', flagdesc => 'Reserve books for patrons', defaulton => 0 },
253         { uniquefieldrequired => 'bit', bit => 7, flag => 'borrow', flagdesc => 'Borrow books', defaulton => 1 },
254         { uniquefieldrequired => 'bit', bit => 8, flag => 'reserveforself', flagdesc => 'Reserve books for self', defaulton => 0 },
255         { uniquefieldrequired => 'bit', bit => 9, flag => 'editcatalogue', flagdesc => 'Edit Catalogue (Modify bibliographic/holdings data)', defaulton => 0 },
256         { uniquefieldrequired => 'bit', bit => 10, flag => 'updatecharges', flagdesc => 'Update borrower charges', defaulton => 0 },
257     ],
258     systempreferences => [
259         { uniquefieldrequired => 'variable', variable => 'autoMemberNum', value => '1', explanation => '1 or else. If 1, Barcode is auto-calculated' },
260         { uniquefieldrequired => 'variable', variable => 'acquisitions', value => 'simple', explanation => 'normal or simple : will use acquisition system found in directory acqui.simple or acquisition' },
261         { uniquefieldrequired => 'variable', variable => 'dateformat', value => 'metric', explanation => 'metric or us' },
262         { uniquefieldrequired => 'variable', variable => 'template', value => 'default', explanation => 'template default name' },
263         { uniquefieldrequired => 'variable', variable => 'autoBarcode', value => '1', explanation => '1 or else. If 1, Barcode is auto-calculated' },
264         { uniquefieldrequired => 'variable', variable => 'insecure', value => 'NO', explanation => 'if YES, no auth at all is needed. Be careful if you set this to yes !' },
265         { uniquefieldrequired => 'variable', variable => 'authoritysep', value => '--', explanation => 'the separator used in authority/thesaurus. Usually --' },
266         { uniquefieldrequired => 'variable', variable => 'opaclanguages', value => 'en', explanation => 'languages' },
267         { uniquefieldrequired => 'variable', variable => 'opacthemes', value => 'default', explanation => 'theme' },
268         { uniquefieldrequired => 'variable', variable => 'timeout', value => '12000000', explanation => 'login timeout' },
269         { uniquefieldrequired => 'variable', variable => 'marc', value => 'ON', explanation => 'MARC support (ON or OFF)' },
270     ],
271
272 );
273
274
275 my %fielddefinitions=(
276 printers => [
277         { field => 'printername', type => 'char(40)', null => '', key => 'PRI', default => '' },
278         ],
279 aqbookfund => [
280         { field => 'bookfundid', type => 'char(5)', null => '', key => 'PRI', default => '' },
281         ],
282 z3950servers => [
283         { field => 'id', type => 'int', null => '', key => 'PRI', default => '', extra => 'auto_increment' },
284         ],
285 );
286
287
288
289 #-------------------
290 # Initialize
291
292 # Start checking
293
294 # Get version of MySQL database engine.
295 my $mysqlversion=`mysqld --version`;
296 $mysqlversion=~/Ver (\S*) /;
297 $mysqlversion=$1;
298 if ($mysqlversion ge '3.23') {
299         print "Could convert to MyISAM database tables...\n";
300 }
301
302 #---------------------------------
303 # Tables
304
305 # Collect all tables into a list
306 $sth=$dbh->prepare("show tables");
307 $sth->execute;
308 while (my ($table) = $sth->fetchrow) {
309     $existingtables{$table}=1;
310 }
311
312 # Now add any missing tables
313 foreach $table ( keys %requiretables ) {
314         print "Checking $table table...\n" if $debug;
315         unless ($existingtables{$table} ) {
316                 print "Adding $table table...\n";
317                 my $sth=$dbh->prepare(
318                         "create table $table $requiretables{$table}" );
319                 $sth->execute;
320                 if ($sth->err) {
321                                 print "Error : $sth->errstr \n";
322                                 $sth->finish;
323                 } # if error
324         } # unless exists
325 } # foreach
326
327 # now drop useless tables
328 foreach $table ( keys %dropable_table) {
329         print "Dropping unused tables...\n" if $debug;
330         if ($existingtables{$table} ) {
331                 $dbh->do("drop table $table");
332                 if ($dbh->err) {
333                 print "Error : $dbh->errstr \n";
334                 }
335         }
336 }
337 unless ($existingtables{'z3950servers'}) {
338         print "Adding z3950servers table...\n";
339         my $sti=$dbh->prepare("create table z3950servers (
340                                                                                 host char(255),
341                                                                                 port int,
342                                                                                 db char(255),
343                                                                                 userid char(255),
344                                                                                 password char(255),
345                                                                                 name text,
346                                                                                 id int,
347                                                                                 checked smallint,
348                                                                                 rank int)");
349         $sti->execute;
350         $sti=$dbh->prepare("insert into z3950servers
351                                                                 values ('z3950.loc.gov',
352                                                                 7090,
353                                                                 'voyager',
354                                                                 '', '',
355                                                                 'Library of Congress',
356                                                                 1, 1, 1)");
357         $sti->execute;
358 }
359
360 #---------------------------------
361 # Columns
362
363 foreach $table ( keys %requirefields ) {
364         print "Check table $table\n" if $debug;
365         $sth=$dbh->prepare("show columns from $table");
366         $sth->execute();
367         undef %types;
368         while ( ($column, $type, $null, $key, $default, $extra)
369                         = $sth->fetchrow) {
370                 $types{$column}=$type;
371         } # while
372         foreach $column ( keys %{ $requirefields{$table} } )  {
373                 print "  Check column $column\n" if $debug;
374                 if ( ! $types{$column} ) {
375                 # column doesn't exist
376                 print "Adding $column field to $table table...\n";
377                 $query="alter table $table
378                         add column $column " . $requirefields{$table}->{$column} ;
379                 print "Execute: $query\n" if $debug;
380                 my $sti=$dbh->prepare($query);
381                 $sti->execute;
382                         if ($sti->err) {
383                                         print "**Error : $sti->errstr \n";
384                                         $sti->finish;
385                         } # if error
386                 } # if column
387         } # foreach column
388 } # foreach table
389
390 foreach $table ( keys %fielddefinitions ) {
391     print "Check table $table\n" if $debug;
392     $sth=$dbh->prepare("show columns from $table");
393     $sth->execute();
394     my $definitions;
395     while ( ($column, $type, $null, $key, $default, $extra) = $sth->fetchrow) {
396         $definitions->{$column}->{type}=$type;
397         $definitions->{$column}->{null}=$null;
398         $definitions->{$column}->{key}=$key;
399         $definitions->{$column}->{default}=$default;
400         $definitions->{$column}->{extra}=$extra;
401     } # while 
402     my $fieldrow=$fielddefinitions{$table};
403     foreach my $row ( @$fieldrow )  {
404         my $field = $row->{field};
405         my $type = $row->{type};
406         my $null = $row->{null};
407         my $key = $row->{key};
408         my $default = $row->{default};
409         my $extra = $row->{extra};
410         my $def=$definitions->{$field};
411         unless ($type eq $def->{type} && $null eq $def->{null} && $key eq $def->{key} && $default eq $def->{default} && $extra eq $def->{extra}) {
412             if ($null eq '') {
413                 $null='NOT NULL';
414             }
415             if ($key eq 'PRI') {
416                 $key ='PRIMARY KEY';
417             }
418             unless ($extra eq 'auto_increment') {
419                 $extra='';
420             }
421             my $sth=$dbh->prepare("alter table $table change $field $field $type $null $key $extra default ?");
422             $sth->execute($default);
423             print "  Alter $field in $table\n";
424         }
425     }
426 }
427
428 # Get list of columns from items table
429 my %itemtypes;
430
431 $sth=$dbh->prepare("show columns from items");
432 $sth->execute;
433 while (my ($column, $type, $null, $key, $default, $extra) = $sth->fetchrow) {
434         $itemtypes{$column}=$type;
435 }
436
437 unless ($itemtypes{'barcode'} eq 'varchar(20)') {
438         $itemtypes{'barcode'}=~/varchar\((\d+)\)/;
439         my $oldlength=$1;
440         if ($oldlength<20) {
441                 print "Setting maximum barcode length to 20 (was $oldlength).\n";
442                 my $sti=$dbh->prepare("alter table items change barcode barcode varchar(20) not null");
443                 $sti->execute;
444         }
445 }
446
447 # extending the timestamp in branchtransfers...
448 my %branchtransfers;
449
450 $sth=$dbh->prepare("show columns from branchtransfers");
451 $sth->execute;
452 while (my ($column, $type, $null, $key, $default, $extra) = $sth->fetchrow) {
453     $branchtransfers{$column}=$type;
454 }
455
456 unless ($branchtransfers{'datesent'} eq 'datetime') {
457     print "Setting type of datesent in branchtransfers to datetime.\n";
458     my $sti=$dbh->prepare("alter table branchtransfers change datesent datesent datetime");
459     $sti->execute;
460 }
461
462 unless ($branchtransfers{'datearrived'} eq 'datetime') {
463     print "Setting type of datearrived in branchtransfers to datetime.\n";
464     my $sti=$dbh->prepare("alter table branchtransfers change datearrived datearrived datetime");
465     $sti->execute;
466 }
467
468 # changing the branchcategories table around...
469 my %branchcategories;
470
471 $sth=$dbh->prepare("show columns from branchcategories");
472 $sth->execute;
473 while (my ($column, $type, $null, $key, $default, $extra) = $sth->fetchrow) {
474         $branchcategories{$column}=$type;
475 }
476
477 unless ($branchcategories{'categorycode'} eq 'varchar(4)') {
478         print "Setting type of categorycode in branchcategories to varchar(4),\n and making the primary key.\n";
479         my $sti=$dbh->prepare("alter table branchcategories change categorycode categorycode varchar(4) not null");
480         $sti->execute;
481         $sti=$dbh->prepare("alter table branchcategories add primary key (categorycode)");
482         $sti->execute;
483 }
484
485 unless ($branchcategories{'categoryname'} eq 'text') {
486         print "Changing branchcode in branchcategories to categoryname text.\n";
487         my $sth=$dbh->prepare("alter table branchcategories change branchcode categoryname text");
488         $sth->execute;
489 }
490
491 unless ($branchcategories{'codedescription'} eq 'text') {
492         print "Replacing branchholding in branchcategories with codedescription text.\n";
493         my $sth=$dbh->prepare("alter table branchcategories change branchholding codedescription text");
494         $sth->execute;
495 }
496
497
498 # Populate tables with required data
499  
500 foreach my $table (keys %tabledata) {
501     print "Checking for data required in table $table...\n";
502     my $tablerows=$tabledata{$table};
503     foreach my $row (@$tablerows) {
504         my $uniquefieldrequired=$row->{uniquefieldrequired};
505         my $uniquevalue=$row->{$uniquefieldrequired};
506         my $sth=$dbh->prepare("select $uniquefieldrequired from $table where $uniquefieldrequired=?");
507         $sth->execute($uniquevalue);
508         unless ($sth->rows) {
509             print "Adding row to $table: ";
510             my @values;
511             my $fieldlist;
512             my $placeholders;
513             foreach my $field (keys %$row) {
514                 (next) if ($field eq 'uniquefieldrequired');
515                 my $value=$row->{$field};
516                 push @values, $value;
517                 print "  $field => $value";
518                 $fieldlist.="$field,";
519                 $placeholders.="?,";
520             }
521             print "\n";
522             $fieldlist=~s/,$//;
523             $placeholders=~s/,$//;
524             my $sth=$dbh->prepare("insert into $table ($fieldlist) values ($placeholders)");
525             $sth->execute(@values);
526         }
527     }
528 }
529
530 $sth->finish;
531
532 exit;
533
534 # $Log$
535 # Revision 1.33  2003/01/21 09:03:27  tipaul
536 # bugfix (NOTE : this bugs makes installation of the 1.3.3 a little fuzzy. Please fix your DB if you installed 1.3.3)
537 #
538 # Revision 1.32  2003/01/16 10:29:45  tipaul
539 # adding a MARC parameter in systempref ( which is ON or OFF)
540 # the search will be a marc search if MARC=ON
541 # and a standard (v1.2) search if MARC=OFF
542 #
543 # Revision 1.31  2003/01/06 13:32:43  tipaul
544 # *** empty log message ***
545 #
546 # Revision 1.29  2003/01/06 11:14:11  tipaul
547 # last bugfixes before 1.3.3 : systempref table correctly filled
548 #
549 # Revision 1.28  2002/12/10 13:27:47  tipaul
550 # bugfixes (davide mails in koha-dev)
551 #
552 # Revision 1.27  2002/11/26 15:04:54  tipaul
553 # road to 1.3.2. Updating db structure during installation
554 #
555 # Revision 1.26  2002/11/12 17:42:40  tonnesen
556 # Merged some features over from rel-1-2, including primary key checking.
557 #
558 # Revision 1.25  2002/11/12 16:44:38  tipaul
559 # road to 1.3.2 :
560 # * many bugfixes
561 # * adding value_builder : you can map a subfield in the marc_subfield_structure to a sub stored in "value_builder" directory. In this directory you can create screen used to build values with any method. In this commit is a 1st draft of the builder for 100$a unimarc french subfield, which is composed of 35 digits, with 12 differents values (only the 4th first are provided for instance)
562 #
563 # Revision 1.24  2002/10/30 14:00:23  arensb
564 # (bug fix): Fixed typo.
565 #
566 # Revision 1.23  2002/10/25 10:55:46  tipaul
567 # Road to 1.3.2
568 # * bugfixes and improvements
569 # * manage mandatory MARC subfields
570 # * new table : authorised_values. this table contains categories and authorised values for the category. On MARC management, you can map a subfield to a authorised_values category. If you do this, the subfield can only be filled with a authorised_value of the selected category.
571 # this submit contains everything needed :
572 # * updatedatabase
573 # * admin screens
574 # * "links" management
575 # * creation of a html-list if a subfield is mapped to an authorised value.
576 #
577 # Note this is different from authorities support, which will come soon.
578 # The authorised_values is supposed to contains a "small" number of authorised values for a category (less than 50-100). If you enter more authorised values than this, it should be hard to find what you want in a BIG list...
579 #
580 # Revision 1.22  2002/10/15 10:08:19  tipaul
581 # fixme corrected, re-indent and adding the marc_breeding table (see commit of marcimport.pl for more explanations about breeding)
582 #
583 # Revision 1.21  2002/10/14 11:48:59  tipaul
584 # bugfix
585 #
586 # Revision 1.20  2002/10/10 04:49:41  arensb
587 # Added some FIXME comments.
588 #
589 # Revision 1.19  2002/10/05 10:17:17  arensb
590 # Merged with arensb-context branch: use C4::Context->dbh instead of
591 # &C4Connect, and generally prefer C4::Context over C4::Database.
592 #
593 # Revision 1.18.2.2  2002/10/05 06:18:43  arensb
594 # Added a whole mess of FIXME comments.
595 #
596 # Revision 1.18.2.1  2002/10/04 02:46:00  arensb
597 # Use C4::Connect instead of C4::Database, C4::Connect->dbh instead
598 # C4Connect.
599 #
600 # Revision 1.18  2002/09/24 13:50:55  tipaul
601 # long WAS the road to 1.3.0...
602 # coming VERY SOON NOW...
603 # modifying installer and buildrelease to update the DB
604 #
605 # Revision 1.17  2002/09/24 12:57:35  tipaul
606 # long WAS the road to 1.3.0...
607 # coming VERY SOON NOW...
608 # modifying installer and buildrelease to update the DB
609 #
610 # Revision 1.16  2002/07/31 02:34:27  finlayt
611 #
612 # added "notforloan" field to the itemtypes table.
613 #
614 # Revision 1.15  2002/07/20 22:30:06  rangi
615 # Making sure fix makes it into the main branch as well
616 # Fix for bug 69
617 #
618 # Revision 1.14  2002/07/08 16:20:26  tonnesen
619 # Added sessionqueries table and password/userid fields to borrowers table
620 #
621 # Revision 1.13  2002/07/04 18:05:36  tonnesen
622 # bug fix
623 #
624 # Revision 1.12  2002/07/04 16:41:06  tonnesen
625 # Merged changes from rel-1-2.  Abstracted table structure changes by alan.
626 #