6 # This script checks for required updates to the database.
8 # Part of the Koha Library Software www.koha.org
9 # Licensed under the GPL.
12 # - Would also be a good idea to offer to do a backup at this time...
14 # NOTE: If you do something more than once in here, make it table driven.
24 # FIXME - The user might be installing a new database, so can't rely
25 # on /etc/koha.conf anyway.
32 %existingtables, # tables already in database
36 $type, $null, $key, $default, $extra,
37 $prefitem, # preference item in systempreferences table
40 my $dbh = C4::Context->dbh;
45 # Tables to add if they don't exist
47 shelfcontents => "( shelfnumber int not null,
48 itemnumber int not null,
50 bookshelf => "( shelfnumber int auto_increment primary key,
51 shelfname char(255))",
52 z3950queue => "( id int auto_increment primary key,
61 identifier char(30))",
62 z3950results => "( id int auto_increment primary key,
72 branchrelations => "( branchcode varchar(4),
73 categorycode varchar(4))",
74 websites => "( websitenumber int(11) NOT NULL auto_increment,
75 biblionumber int(11) NOT NULL default '0',
79 PRIMARY KEY (websitenumber) )",
80 marcrecorddone => "( isbn char(40),
83 controlnumber char(40))",
84 uploadedmarc => "( id int(11) NOT NULL auto_increment PRIMARY KEY,
86 hidden smallint(6) default NULL,
87 name varchar(255) default NULL)",
88 ethnicity => "( code varchar(10) NOT NULL default '',
89 name varchar(255) default NULL,
90 PRIMARY KEY (code) )",
91 sessions => "( sessionID varchar(255) NOT NULL default '',
92 userid varchar(255) default NULL,
93 ip varchar(16) default NULL,
95 PRIMARY KEY (sessionID) )",
96 sessionqueries => "( sessionID varchar(255) NOT NULL default '',
97 userid char(100) NOT NULL default '',
98 ip char(18) NOT NULL default '',
99 url text NOT NULL default '' )",
100 bibliothesaurus => "( id bigint(20) NOT NULL auto_increment,
101 freelib char(255) NOT NULL default '',
102 stdlib char(255) NOT NULL default '',
103 category char(10) NOT NULL default '',
104 level tinyint(4) NOT NULL default '1',
105 hierarchy char(80) NOT NULL default '',
106 father char(80) NOT NULL default '',
108 KEY freelib (freelib),
110 KEY category (category),
111 KEY hierarchy (hierarchy)
114 bibid bigint(20) unsigned NOT NULL auto_increment,
115 biblionumber int(11) NOT NULL default '0',
116 datecreated date NOT NULL default '0000-00-00',
117 datemodified date default NULL,
118 origincode char(20) default NULL,
120 KEY origincode (origincode),
121 KEY biblionumber (biblionumber)
123 marc_blob_subfield => "(
124 blobidlink bigint(20) NOT NULL auto_increment,
125 subfieldvalue longtext NOT NULL,
126 PRIMARY KEY (blobidlink)
128 marc_subfield_structure => "(
129 tagfield char(3) NOT NULL default '',
130 tagsubfield char(1) NOT NULL default '',
131 liblibrarian char(255) NOT NULL default '',
132 libopac char(255) NOT NULL default '',
133 repeatable tinyint(4) NOT NULL default '0',
134 mandatory tinyint(4) NOT NULL default '0',
135 kohafield char(40) default NULL,
136 tab tinyint(1) default NULL,
137 authorised_value char(10) default NULL,
138 thesaurus_category char(10) default NULL,
139 value_builder char(80) default NULL,
140 PRIMARY KEY (tagfield,tagsubfield),
141 KEY kohafield (kohafield),
144 marc_subfield_table => "(
145 subfieldid bigint(20) unsigned NOT NULL auto_increment,
146 bibid bigint(20) unsigned NOT NULL default '0',
147 tag char(3) NOT NULL default '',
148 tagorder tinyint(4) NOT NULL default '1',
149 tag_indicator char(2) NOT NULL default '',
150 subfieldcode char(1) NOT NULL default '',
151 subfieldorder tinyint(4) NOT NULL default '1',
152 subfieldvalue varchar(255) default NULL,
153 valuebloblink bigint(20) default NULL,
154 PRIMARY KEY (subfieldid),
157 KEY tag_indicator (tag_indicator),
158 KEY subfieldorder (subfieldorder),
159 KEY subfieldcode (subfieldcode),
160 KEY subfieldvalue (subfieldvalue),
161 KEY tagorder (tagorder)
163 marc_tag_structure => "(
164 tagfield char(3) NOT NULL default '',
165 liblibrarian char(255) NOT NULL default '',
166 libopac char(255) NOT NULL default '',
167 repeatable tinyint(4) NOT NULL default '0',
168 mandatory tinyint(4) NOT NULL default '0',
169 authorised_value char(10) default NULL,
170 PRIMARY KEY (tagfield)
173 bibid bigint(20) NOT NULL default '0',
174 tag char(3) NOT NULL default '',
175 tagorder tinyint(4) NOT NULL default '1',
176 subfieldid char(1) NOT NULL default '',
177 subfieldorder tinyint(4) NOT NULL default '1',
178 word varchar(255) NOT NULL default '',
179 sndx_word varchar(255) NOT NULL default '',
182 KEY tagorder (tagorder),
183 KEY subfieldid (subfieldid),
184 KEY subfieldorder (subfieldorder),
186 KEY sndx_word (sndx_word)
188 marc_breeding => "( id bigint(20) NOT NULL auto_increment,
189 file varchar(80) NOT NULL default '',
190 isbn varchar(10) NOT NULL default '',
191 title varchar(128) default NULL,
192 author varchar(80) default NULL,
194 encoding varchar(40) default NULL,
199 authorised_values => "(id int(11) NOT NULL auto_increment,
200 category char(10) NOT NULL default '',
201 authorised_value char(80) NOT NULL default '',
206 userflags => "( bit int(11) NOT NULL default '0',
207 flag char(30), flagdesc char(255),
212 my %requirefields = (
213 biblio => { 'abstract' => 'text' },
214 deletedbiblio => { 'abstract' => 'text' },
216 'lccn' => 'char(25)',
217 'url' => 'varchar(255)',
220 deletedbiblioitems => {
221 'lccn' => 'char(25)',
222 'url' => 'varchar(255)',
225 branchtransfers => { 'datearrived' => 'datetime' },
226 statistics => { 'borrowernumber' => 'int(11)' },
228 'invoicedisc' => 'float(6,4)',
229 'nocalc' => 'int(11)'
232 'userid' => 'char(30)',
233 'password' => 'char(30)',
234 'flags' => 'int(11)',
235 'textmessaging' => 'varchar(30)',
236 'zipcode' => 'varchar(25)',
237 'homezipcode' => 'varchar(25)',
239 aqorders => { 'budgetdate' => 'date' },
240 aqbudget => {'aqbudgetid' => 'tinyint(4) auto_increment primary key'},
242 #added so that reference items are not available for reserves...
243 itemtypes => { 'notforloan' => 'smallint(6)' },
244 systempreferences => { 'explanation' => 'char(80)',
245 'type' => 'char(20)',
246 'options' => 'text' },
247 z3950servers => { 'syntax' => 'char(80)' },
250 my %dropable_table = (
251 classification => 'classification',
252 multipart => 'multipart',
253 multivolume => 'multivolume',
254 newitems => 'newitems',
255 procedures => 'procedures',
256 publisher => 'publisher',
257 searchstats => 'searchstats',
258 serialissues => 'serialissues',
261 # the other hash contains other actions that can't be done elsewhere. they are done
262 # either BEFORE of AFTER everything else, depending on "when" entry (default => AFTER)
264 # The tabledata hash contains data that should be in the tables.
265 # The uniquefieldrequired hash entry is used to determine which (if any) fields
266 # must not exist in the table for this row to be inserted. If the
267 # uniquefieldrequired entry is already in the table, the existing data is not
268 # modified, unless the forceupdate hash entry is also set. Fields in the
269 # anonymous "forceupdate" hash will be forced to be updated to the default
270 # values given in the %tabledata hash.
275 uniquefieldrequired => 'bit',
277 flag => 'superlibrarian',
278 flagdesc => 'Access to all librarian functions',
282 uniquefieldrequired => 'bit',
285 flagdesc => 'Circulate books',
289 uniquefieldrequired => 'bit',
292 flagdesc => 'View Catalogue (Librarian Interface)',
296 uniquefieldrequired => 'bit',
298 flag => 'parameters',
299 flagdesc => 'Set Koha system paramters',
303 uniquefieldrequired => 'bit',
306 flagdesc => 'Add or modify borrowers',
310 uniquefieldrequired => 'bit',
312 flag => 'permissions',
313 flagdesc => 'Set user permissions',
317 uniquefieldrequired => 'bit',
319 flag => 'reserveforothers',
320 flagdesc => 'Reserve books for patrons',
324 uniquefieldrequired => 'bit',
327 flagdesc => 'Borrow books',
331 uniquefieldrequired => 'bit',
333 flag => 'reserveforself',
334 flagdesc => 'Reserve books for self',
338 uniquefieldrequired => 'bit',
340 flag => 'editcatalogue',
341 flagdesc => 'Edit Catalogue (Modify bibliographic/holdings data)',
345 uniquefieldrequired => 'bit',
347 flag => 'updatecharges',
348 flagdesc => 'Update borrower charges',
352 systempreferences => [
354 uniquefieldrequired => 'variable',
355 forceupdate => { 'explanation' => 1,
357 variable => 'autoMemberNum',
359 explanation => 'Member number is auto-calculated',
364 uniquefieldrequired => 'variable',
365 forceupdate => { 'explanation' => 1,
368 variable => 'acquisitions',
371 'Normal, budget-based acquisitions, or Simple bibliographic-data acquisitions',
373 options => 'simple|normal'
376 uniquefieldrequired => 'variable',
377 forceupdate => { 'explanation' => 1,
380 variable => 'dateformat',
383 'date format (US mm/dd/yyyy, metric dd/mm/yyy, ISO yyyy/mm/dd)',
385 options => 'metric|us|iso'
388 uniquefieldrequired => 'variable',
389 variable => 'template',
390 forceupdate => { 'explanation' => 1,
393 explanation => 'Preference order for intranet interface templates',
397 uniquefieldrequired => 'variable',
398 variable => 'autoBarcode',
399 forceupdate => { 'explanation' => 1,
402 explanation => 'Barcode is auto-calculated',
406 uniquefieldrequired => 'variable',
407 variable => 'insecure',
408 forceupdate => { 'explanation' => 1,
412 'If YES, no auth at all is needed. Be careful if you set this to yes!',
416 uniquefieldrequired => 'variable',
417 variable => 'authoritysep',
418 forceupdate => { 'explanation' => 1,
423 'the separator used in authority/thesaurus. Usually --',
428 uniquefieldrequired => 'variable',
429 variable => 'opaclanguages',
430 forceupdate => { 'explanation' => 1,
433 explanation => 'Set the preferred order for translations. The top language will be tried first.',
437 uniquefieldrequired => 'variable',
438 variable => 'opacthemes',
439 forceupdate => { 'explanation' => 1,
442 explanation => 'Set the preferred order for themes. The top theme will be tried first.',
446 uniquefieldrequired => 'variable',
447 variable => 'timeout',
448 forceupdate => { 'explanation' => 1,
451 explanation => 'Inactivity timeout for cookies authentication (in seconds)',
455 uniquefieldrequired => 'variable',
457 forceupdate => { 'explanation' => 1,
460 explanation => 'Turn on MARC support',
464 uniquefieldrequired => 'variable',
465 variable => 'marcflavour',
466 forceupdate => { 'explanation' => 1,
471 'your MARC flavor (MARC21 or UNIMARC) used for character encoding',
473 options => 'MARC21|UNIMARC'
476 uniquefieldrequired => 'variable',
477 variable => 'checkdigit',
479 forceupdate => { 'explanation' => 1,
482 explanation => 'Validity checks on membership number: none or "Katipo" style checks',
484 options => 'none|katipo'
487 uniquefieldrequired => 'variable',
488 variable => 'maxoutstanding',
489 forceupdate => { 'explanation' => 1,
493 'maximum amount withstanding to be able make reserves ',
497 uniquefieldrequired => 'variable',
498 variable => 'maxreserves',
499 forceupdate => { 'explanation' => 1,
503 'maximum number of reserves a member can make',
508 uniquefieldrequired => 'variable',
509 variable => 'noissuescharge',
510 forceupdate => { 'explanation' => 1,
514 'maximum amount withstanding to be able to check out an item',
519 uniquefieldrequired => 'variable',
520 variable => 'KohaAdminEmailAddress',
521 forceupdate => { 'explanation' => 1,
523 value => 'your.mail@here',
524 explanation => 'the email address where borrowers modifs are sent',
528 uniquefieldrequired => 'variable',
530 forceupdate => { 'explanation' => 1,
533 explanation => 'the gist rate. NOT in %, but in numeric form (0.12 for 12%)',
540 my %fielddefinitions = (
543 field => 'printername',
552 field => 'bookfundid',
561 field => 'aqbudgetid',
562 type => 'tinyint(4)',
566 extra => 'auto_increment'
576 extra => 'auto_increment'
581 field => 'z3950random',
582 type => 'varchar(40)',
590 type => 'varchar(40)',
604 # Get version of MySQL database engine.
605 my $mysqlversion = `mysqld --version`;
606 $mysqlversion =~ /Ver (\S*) /;
608 if ( $mysqlversion ge '3.23' ) {
609 print "Could convert to MyISAM database tables...\n";
612 #---------------------------------
615 # Collect all tables into a list
616 $sth = $dbh->prepare("show tables");
618 while ( my ($table) = $sth->fetchrow ) {
619 $existingtables{$table} = 1;
623 # Now add any missing tables
624 foreach $table ( keys %requiretables ) {
625 print "Checking $table table...\n" if $debug;
626 unless ( $existingtables{$table} ) {
627 print "Adding $table table...\n";
628 my $sth = $dbh->prepare("create table $table $requiretables{$table}");
631 print "Error : $sth->errstr \n";
637 # now drop useless tables
638 foreach $table ( keys %dropable_table ) {
639 print "Dropping unused tables...\n" if $debug;
640 if ( $existingtables{$table} ) {
641 $dbh->do("drop table $table");
643 print "Error : $dbh->errstr \n";
647 unless ( $existingtables{'z3950servers'} ) {
648 print "Adding z3950servers table...\n";
649 my $sti = $dbh->prepare( "create table z3950servers (
662 $sti = $dbh->prepare( "insert into z3950servers
663 values ('z3950.loc.gov',
667 'Library of Congress',
673 #---------------------------------
676 foreach $table ( keys %requirefields ) {
677 print "Check table $table\n" if $debug;
678 $sth = $dbh->prepare("show columns from $table");
681 while ( ( $column, $type, $null, $key, $default, $extra ) = $sth->fetchrow )
683 $types{$column} = $type;
685 foreach $column ( keys %{ $requirefields{$table} } ) {
686 print " Check column $column [$types{$column}]\n" if $debug;
687 if ( !$types{$column} ) {
689 # column doesn't exist
690 print "Adding $column field to $table table...\n";
691 $query = "alter table $table
692 add column $column " . $requirefields{$table}->{$column};
693 print "Execute: $query\n" if $debug;
694 my $sti = $dbh->prepare($query);
697 print "**Error : $sti->errstr \n";
704 foreach $table ( keys %fielddefinitions ) {
705 print "Check table $table\n" if $debug;
706 $sth = $dbh->prepare("show columns from $table");
709 while ( ( $column, $type, $null, $key, $default, $extra ) = $sth->fetchrow )
711 $definitions->{$column}->{type} = $type;
712 $definitions->{$column}->{null} = $null;
713 $definitions->{$column}->{key} = $key;
714 $definitions->{$column}->{default} = $default;
715 $definitions->{$column}->{extra} = $extra;
717 my $fieldrow = $fielddefinitions{$table};
718 foreach my $row (@$fieldrow) {
719 my $field = $row->{field};
720 my $type = $row->{type};
721 my $null = $row->{null};
722 my $key = $row->{key};
723 my $default = $row->{default};
724 $default="''" unless $default;
725 my $extra = $row->{extra};
726 my $def = $definitions->{$field};
727 unless ( $type eq $def->{type}
728 && $null eq $def->{null}
729 && $key eq $def->{key}
730 && $default eq $def->{default}
731 && $extra eq $def->{extra} )
737 if ( $key eq 'PRI' ) {
738 $key = 'PRIMARY KEY';
740 unless ( $extra eq 'auto_increment' ) {
743 # if it's a new column use "add", if it's an old one, use "change".
745 if ($definitions->{$field}->{type}) {
746 $action="change $field"
750 # if it's a primary key, drop the previous pk, before altering the table
752 if ($key ne 'PRIMARY KEY') {
753 $sth =$dbh->prepare("alter table $table $action $field $type $null $key $extra default ?");
755 $sth =$dbh->prepare("alter table $table drop primary key, $action $field $type $null $key $extra default ?");
757 $sth->execute($default);
758 print " Alter $field in $table\n";
763 # Get list of columns from items table
766 $sth = $dbh->prepare("show columns from items");
768 while ( my ( $column, $type, $null, $key, $default, $extra ) = $sth->fetchrow )
770 $itemtypes{$column} = $type;
771 $nullenabled{$column} = $null;
774 unless ( $itemtypes{'barcode'} eq 'varchar(20)' ) {
775 $itemtypes{'barcode'} =~ /varchar\((\d+)\)/;
777 if ( $oldlength < 20 ) {
778 print "Setting maximum barcode length to 20 (was $oldlength).\n";
781 "alter table items change barcode barcode varchar(20)");
786 # dropping unique barcode index & setting barcode to null allowed.
788 $sth = $dbh->prepare("show index from items");
790 while ( my ( $table, $non_unique, $key_name, $Seq_in_index, $Column_name, $Collation, $cardinality, $sub_part, $Packed, $comment ) = $sth->fetchrow )
792 if ($key_name eq 'barcode' && $non_unique eq 0) {
793 print "dropping BARCODE index to enable empty barcodes\n";
794 $dbh->do("ALTER TABLE `items` DROP INDEX `barcode`");
797 $dbh->do("ALTER TABLE `items` CHANGE `barcode` `barcode` VARCHAR( 20 )") unless ($nullenabled{barcode} eq 'YES');
799 # changing z3950daemon field to NULL in marc_breeding
800 $dbh->do("ALTER TABLE `marc_breeding` CHANGE `z3950random` `z3950random` VARCHAR( 40 )");
802 # extending the timestamp in branchtransfers...
805 $sth = $dbh->prepare("show columns from branchtransfers");
807 while ( my ( $column, $type, $null, $key, $default, $extra ) = $sth->fetchrow )
809 $branchtransfers{$column} = $type;
812 unless ( $branchtransfers{'datesent'} eq 'datetime' ) {
813 print "Setting type of datesent in branchtransfers to datetime.\n";
816 "alter table branchtransfers change datesent datesent datetime");
820 unless ( $branchtransfers{'datearrived'} eq 'datetime' ) {
821 print "Setting type of datearrived in branchtransfers to datetime.\n";
824 "alter table branchtransfers change datearrived datearrived datetime");
828 # changing the branchcategories table around...
829 my %branchcategories;
831 $sth = $dbh->prepare("show columns from branchcategories");
833 while ( my ( $column, $type, $null, $key, $default, $extra ) = $sth->fetchrow )
835 $branchcategories{$column} = $type;
838 unless ( $branchcategories{'categorycode'} eq 'varchar(4)' ) {
840 "Setting type of categorycode in branchcategories to varchar(4),\n and making the primary key.\n";
843 "alter table branchcategories change categorycode categorycode varchar(4) not null"
848 "alter table branchcategories add primary key (categorycode)");
852 unless ( $branchcategories{'categoryname'} eq 'text' ) {
853 print "Changing branchcode in branchcategories to categoryname text.\n";
856 "alter table branchcategories change branchcode categoryname text");
860 unless ( $branchcategories{'codedescription'} eq 'text' ) {
862 "Replacing branchholding in branchcategories with codedescription text.\n";
865 "alter table branchcategories change branchholding codedescription text"
870 # Populate tables with required data
872 foreach my $table ( keys %tabledata ) {
873 print "Checking for data required in table $table...\n";
874 my $tablerows = $tabledata{$table};
875 foreach my $row (@$tablerows) {
876 my $uniquefieldrequired = $row->{uniquefieldrequired};
877 my $uniquevalue = $row->{$uniquefieldrequired};
878 my $forceupdate = $row->{forceupdate};
881 "select $uniquefieldrequired from $table where $uniquefieldrequired=?"
883 $sth->execute($uniquevalue);
885 foreach my $field (keys %$forceupdate) {
886 if ($forceupdate->{$field}) {
887 my $sth=$dbh->prepare("update systempreferences set $field=? where $uniquefieldrequired=?");
888 $sth->execute($row->{$field}, $uniquevalue);
892 print "Adding row to $table: ";
896 foreach my $field ( keys %$row ) {
897 next if $field eq 'uniquefieldrequired';
898 next if $field eq 'forceupdate';
899 my $value = $row->{$field};
900 push @values, $value;
901 print " $field => $value";
902 $fieldlist .= "$field,";
903 $placeholders .= "?,";
906 $fieldlist =~ s/,$//;
907 $placeholders =~ s/,$//;
910 "insert into $table ($fieldlist) values ($placeholders)");
911 $sth->execute(@values);
921 # Revision 1.62 2003/10/20 16:10:19 slef
922 # Adding USMARC to LOC z3950 entry
924 # Revision 1.61 2003/10/01 15:03:45 tipaul
925 # oups... typo fix in z3950random field definition
927 # Revision 1.59 2003/09/30 16:22:05 tipaul
928 # adding barcode NOT mandatory feature. Just run updatedatabase to get it.
929 # Note it's impossible to issue an item without barcode, as issue/returns is based on barcode...
931 # Revision 1.58 2003/07/16 04:08:29 acli
932 # Minor spelling correction
934 # Revision 1.57 2003/07/11 11:50:29 tipaul
935 # fixing a bug that occured when adding a field into a table.
937 # Revision 1.56 2003/07/07 15:37:20 tipaul
938 # *** empty log message ***
940 # Revision 1.53 2003/07/07 14:11:16 tipaul
941 # fixing bug #526 : gst rate is now calculated through systempref gist entry.
943 # * was harcoded to 12,5%
944 # * some bugs in template parameters prevented the javascript to work.
945 # * some bugs prevented some calculations to be done properly.
947 # Revision 1.52 2003/06/23 15:54:32 tipaul
948 # *** empty log message ***
950 # Revision 1.51 2003/06/23 11:27:29 tipaul
951 # *** empty log message ***
953 # Revision 1.50 2003/06/11 21:28:22 tonnesen
954 # Added modifications required to the systempreferences table by the new
955 # systempreferences.pl script. The systempreferences.pl script will not work
956 # properly until this table is updated.
958 # Revision 1.49 2003/05/26 10:41:53 tipaul
959 # bugfix : borrowers modifs overwritten by stupid hash entry existing twice.
961 # Revision 1.48 2003/05/20 19:50:45 slef
962 # Initial fix to bug 456: hardwired paths
964 # Revision 1.47 2003/05/15 12:23:33 tipaul
965 # adding zipcode and homezipcode into borrowers table (bug #246
967 # Revision 1.46 2003/05/08 12:48:24 wolfpac444
968 # Added "noissuescharge" parameter
970 # Revision 1.45 2003/05/08 12:26:16 wolfpac444
973 # Revision 1.44 2003/05/03 05:39:57 rangi
975 # (Wording changes in the explanation fields in system preferences)
977 # Revision 1.43 2003/05/02 23:01:09 rangi
978 # Adding the textmessaging column to the borrowers table.
979 # insertdata.pl is expecting this to exist, and hence modifying/adding
980 # borrowers was broken.
982 # Also ran they script thru perltidy
984 # Revision 1.42 2003/04/29 16:53:25 tipaul
985 # really proud of this commit :-)
986 # z3950 search and import seems to works fine.
987 # Let me explain how :
988 # * a "search z3950" button is added in the addbiblio template.
989 # * when clicked, a popup appears and z3950/search.pl is called
990 # * z3950/search.pl calls addz3950search in the DB
991 # * the z3950 daemon retrieve the records and stores them in z3950results AND in marc_breeding table.
992 # * as long as there as searches pending, the popup auto refresh every 2 seconds, and says how many searches are pending.
993 # * when the user clicks on a z3950 result => the parent popup is called with the requested biblio, and auto-filled
996 # * character encoding support : (It's a nightmare...) In the z3950servers table, a "encoding" column has been added. You can put "UNIMARC" or "USMARC" in this column. Depending on this, the char_decode in C4::Biblio.pm replaces marc-char-encode by an iso 8859-1 encoding. Note that in the breeding import this value has been added too, for a better support.
997 # * the marc_breeding and z3950* tables have been modified : they have an encoding column and the random z3950 number is stored too for convenience => it's the key I use to list only requested biblios in the popup.
999 # Revision 1.41 2003/04/29 08:09:44 tipaul
1000 # z3950 support is coming...
1001 # * adding a syntax column in z3950 table = this column will say wether the z3950 must be called with PerferedRecordsyntax => USMARC or PerferedRecordsyntax => UNIMARC. I tried some french UNIMARC z3950 servers, and some only send USMARC, some only UNIMARC, some can answer with both.
1002 # Note this is a 1st draft. More to follow (today ? I hope).
1004 # Revision 1.40 2003/04/22 10:48:27 wolfpac444
1005 # Added "father" column to bibliothesaurus table
1007 # Revision 1.39 2003/04/04 08:45:00 tipaul
1008 # last commits before 1.9.1
1010 # Revision 1.38 2003/03/18 10:58:19 tipaul
1011 # adding checkdigit parameter that choose how to check the members cardnumber.
1013 # * none = no checking
1014 # * katipo = checked as before
1016 # Revision 1.37 2003/01/30 01:47:48 acli
1017 # Corrected syntax error reported by Benedict
1019 # Made the indentation somewhat easier to read; the messiness probably caused
1020 # the original syntax error.
1022 # Revision 1.36 2003/01/28 15:13:30 tipaul
1023 # userflag table now created in upgrade script (bugfix #171)
1025 # Revision 1.35 2003/01/27 03:12:49 acli
1026 # Reworded the description for "acquisitions" to make it fit on the screen
1028 # Added "iso" to dateformat, since dateformat is not yet being used anyway
1030 # Revision 1.34 2003/01/23 12:30:02 tipaul
1031 # introducint marcflavour in systempref file : used for character decoding
1033 # Revision 1.33 2003/01/21 09:03:27 tipaul
1034 # bugfix (NOTE : this bugs makes installation of the 1.3.3 a little fuzzy. Please fix your DB if you installed 1.3.3)
1036 # Revision 1.32 2003/01/16 10:29:45 tipaul
1037 # adding a MARC parameter in systempref ( which is ON or OFF)
1038 # the search will be a marc search if MARC=ON
1039 # and a standard (v1.2) search if MARC=OFF
1041 # Revision 1.31 2003/01/06 13:32:43 tipaul
1042 # *** empty log message ***
1044 # Revision 1.29 2003/01/06 11:14:11 tipaul
1045 # last bugfixes before 1.3.3 : systempref table correctly filled
1047 # Revision 1.28 2002/12/10 13:27:47 tipaul
1048 # bugfixes (davide mails in koha-dev)
1050 # Revision 1.27 2002/11/26 15:04:54 tipaul
1051 # road to 1.3.2. Updating db structure during installation
1053 # Revision 1.26 2002/11/12 17:42:40 tonnesen
1054 # Merged some features over from rel-1-2, including primary key checking.
1056 # Revision 1.25 2002/11/12 16:44:38 tipaul
1059 # * 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)
1061 # Revision 1.24 2002/10/30 14:00:23 arensb
1062 # (bug fix): Fixed typo.
1064 # Revision 1.23 2002/10/25 10:55:46 tipaul
1066 # * bugfixes and improvements
1067 # * manage mandatory MARC subfields
1068 # * 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.
1069 # this submit contains everything needed :
1072 # * "links" management
1073 # * creation of a html-list if a subfield is mapped to an authorised value.
1075 # Note this is different from authorities support, which will come soon.
1076 # 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...
1078 # Revision 1.22 2002/10/15 10:08:19 tipaul
1079 # fixme corrected, re-indent and adding the marc_breeding table (see commit of marcimport.pl for more explanations about breeding)
1081 # Revision 1.21 2002/10/14 11:48:59 tipaul
1084 # Revision 1.20 2002/10/10 04:49:41 arensb
1085 # Added some FIXME comments.
1087 # Revision 1.19 2002/10/05 10:17:17 arensb
1088 # Merged with arensb-context branch: use C4::Context->dbh instead of
1089 # &C4Connect, and generally prefer C4::Context over C4::Database.
1091 # Revision 1.18.2.2 2002/10/05 06:18:43 arensb
1092 # Added a whole mess of FIXME comments.
1094 # Revision 1.18.2.1 2002/10/04 02:46:00 arensb
1095 # Use C4::Connect instead of C4::Database, C4::Connect->dbh instead
1098 # Revision 1.18 2002/09/24 13:50:55 tipaul
1099 # long WAS the road to 1.3.0...
1100 # coming VERY SOON NOW...
1101 # modifying installer and buildrelease to update the DB
1103 # Revision 1.17 2002/09/24 12:57:35 tipaul
1104 # long WAS the road to 1.3.0...
1105 # coming VERY SOON NOW...
1106 # modifying installer and buildrelease to update the DB
1108 # Revision 1.16 2002/07/31 02:34:27 finlayt
1110 # added "notforloan" field to the itemtypes table.
1112 # Revision 1.15 2002/07/20 22:30:06 rangi
1113 # Making sure fix makes it into the main branch as well
1116 # Revision 1.14 2002/07/08 16:20:26 tonnesen
1117 # Added sessionqueries table and password/userid fields to borrowers table
1119 # Revision 1.13 2002/07/04 18:05:36 tonnesen
1122 # Revision 1.12 2002/07/04 16:41:06 tonnesen
1123 # Merged changes from rel-1-2. Abstracted table structure changes by alan.