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;
41 print "connected to your DB. Checking & modifying it\n";
46 # Tables to add if they don't exist
48 shelfcontents => "( shelfnumber int not null,
49 itemnumber int not null,
51 bookshelf => "( shelfnumber int auto_increment primary key,
52 shelfname char(255))",
53 z3950queue => "( id int auto_increment primary key,
62 identifier char(30))",
63 z3950results => "( id int auto_increment primary key,
73 branchrelations => "( branchcode varchar(4),
74 categorycode varchar(4))",
75 websites => "( websitenumber int(11) NOT NULL auto_increment,
76 biblionumber int(11) NOT NULL default '0',
80 PRIMARY KEY (websitenumber) )",
81 marcrecorddone => "( isbn char(40),
84 controlnumber char(40))",
85 uploadedmarc => "( id int(11) NOT NULL auto_increment PRIMARY KEY,
87 hidden smallint(6) default NULL,
88 name varchar(255) default NULL)",
89 ethnicity => "( code varchar(10) NOT NULL default '',
90 name varchar(255) default NULL,
91 PRIMARY KEY (code) )",
92 sessions => "( sessionID varchar(255) NOT NULL default '',
93 userid varchar(255) default NULL,
94 ip varchar(16) default NULL,
96 PRIMARY KEY (sessionID) )",
97 sessionqueries => "( sessionID varchar(255) NOT NULL default '',
98 userid char(100) NOT NULL default '',
99 ip char(18) NOT NULL default '',
100 url text NOT NULL default '' )",
101 bibliothesaurus => "( id bigint(20) NOT NULL auto_increment,
102 freelib char(255) NOT NULL default '',
103 stdlib char(255) NOT NULL default '',
104 category char(10) NOT NULL default '',
105 level tinyint(4) NOT NULL default '1',
106 hierarchy char(80) NOT NULL default '',
107 father char(80) NOT NULL default '',
109 KEY freelib (freelib),
111 KEY category (category),
112 KEY hierarchy (hierarchy)
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,
121 KEY origincode (origincode),
122 KEY biblionumber (biblionumber)
124 marc_blob_subfield => "(
125 blobidlink bigint(20) NOT NULL auto_increment,
126 subfieldvalue longtext NOT NULL,
127 PRIMARY KEY (blobidlink)
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),
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),
158 KEY tag_indicator (tag_indicator),
159 KEY subfieldorder (subfieldorder),
160 KEY subfieldcode (subfieldcode),
161 KEY subfieldvalue (subfieldvalue),
162 KEY tagorder (tagorder)
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)
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 '',
183 KEY tagorder (tagorder),
184 KEY subfieldid (subfieldid),
185 KEY subfieldorder (subfieldorder),
187 KEY sndx_word (sndx_word)
189 marc_breeding => "( id bigint(20) NOT NULL auto_increment,
190 file varchar(80) NOT NULL default '',
191 isbn varchar(10) NOT NULL default '',
192 title varchar(128) default NULL,
193 author varchar(80) default NULL,
195 encoding varchar(40) default NULL,
200 authorised_values => "(id int(11) NOT NULL auto_increment,
201 category char(10) NOT NULL default '',
202 authorised_value char(80) NOT NULL default '',
207 userflags => "( bit int(11) NOT NULL default '0',
208 flag char(30), flagdesc char(255),
213 my %requirefields = (
214 biblio => { 'abstract' => 'text' },
215 deletedbiblio => { 'abstract' => 'text', 'marc' => 'blob' },
216 deleteditems => { 'marc' => 'blob', 'paidfor' => 'text' },
218 'lccn' => 'char(25)',
219 'url' => 'varchar(255)',
222 deletedbiblioitems => {
223 'lccn' => 'char(25)',
224 'url' => 'varchar(255)',
227 branchtransfers => { 'datearrived' => 'datetime' },
228 statistics => { 'borrowernumber' => 'int(11)' },
230 'invoicedisc' => 'float(6,4)',
231 'nocalc' => 'int(11)'
234 'userid' => 'char(30)',
235 'password' => 'char(30)',
236 'flags' => 'int(11)',
237 'textmessaging' => 'varchar(30)',
238 'zipcode' => 'varchar(25)',
239 'homezipcode' => 'varchar(25)',
241 aqorders => { 'budgetdate' => 'date' },
242 aqbudget => {'aqbudgetid' => 'tinyint(4) auto_increment primary key'},
243 items => {'paidfor' => 'text'},
245 #added so that reference items are not available for reserves...
246 itemtypes => { 'notforloan' => 'smallint(6)' },
247 systempreferences => { 'explanation' => 'char(80)',
248 'type' => 'char(20)',
249 'options' => 'text' },
250 z3950servers => { 'syntax' => 'char(80)' },
253 my %dropable_table = (
254 classification => 'classification',
255 multipart => 'multipart',
256 multivolume => 'multivolume',
257 newitems => 'newitems',
258 procedures => 'procedures',
259 publisher => 'publisher',
260 searchstats => 'searchstats',
261 serialissues => 'serialissues',
264 # the other hash contains other actions that can't be done elsewhere. they are done
265 # either BEFORE of AFTER everything else, depending on "when" entry (default => AFTER)
267 # The tabledata hash contains data that should be in the tables.
268 # The uniquefieldrequired hash entry is used to determine which (if any) fields
269 # must not exist in the table for this row to be inserted. If the
270 # uniquefieldrequired entry is already in the table, the existing data is not
271 # modified, unless the forceupdate hash entry is also set. Fields in the
272 # anonymous "forceupdate" hash will be forced to be updated to the default
273 # values given in the %tabledata hash.
278 uniquefieldrequired => 'bit',
280 flag => 'superlibrarian',
281 flagdesc => 'Access to all librarian functions',
285 uniquefieldrequired => 'bit',
288 flagdesc => 'Circulate books',
292 uniquefieldrequired => 'bit',
295 flagdesc => 'View Catalogue (Librarian Interface)',
299 uniquefieldrequired => 'bit',
301 flag => 'parameters',
302 flagdesc => 'Set Koha system paramters',
306 uniquefieldrequired => 'bit',
309 flagdesc => 'Add or modify borrowers',
313 uniquefieldrequired => 'bit',
315 flag => 'permissions',
316 flagdesc => 'Set user permissions',
320 uniquefieldrequired => 'bit',
322 flag => 'reserveforothers',
323 flagdesc => 'Reserve books for patrons',
327 uniquefieldrequired => 'bit',
330 flagdesc => 'Borrow books',
334 uniquefieldrequired => 'bit',
336 flag => 'reserveforself',
337 flagdesc => 'Reserve books for self',
341 uniquefieldrequired => 'bit',
343 flag => 'editcatalogue',
344 flagdesc => 'Edit Catalogue (Modify bibliographic/holdings data)',
348 uniquefieldrequired => 'bit',
350 flag => 'updatecharges',
351 flagdesc => 'Update borrower charges',
355 systempreferences => [
357 uniquefieldrequired => 'variable',
358 forceupdate => { 'explanation' => 1,
360 variable => 'autoMemberNum',
362 explanation => 'Member number is auto-calculated',
367 uniquefieldrequired => 'variable',
368 forceupdate => { 'explanation' => 1,
371 variable => 'acquisitions',
374 'Normal, budget-based acquisitions, or Simple bibliographic-data acquisitions',
376 options => 'simple|normal'
379 uniquefieldrequired => 'variable',
380 forceupdate => { 'explanation' => 1,
383 variable => 'dateformat',
386 'date format (US mm/dd/yyyy, metric dd/mm/yyy, ISO yyyy/mm/dd)',
388 options => 'metric|us|iso'
391 uniquefieldrequired => 'variable',
392 variable => 'template',
393 forceupdate => { 'explanation' => 1,
396 explanation => 'Preference order for intranet interface templates',
400 uniquefieldrequired => 'variable',
401 variable => 'autoBarcode',
402 forceupdate => { 'explanation' => 1,
405 explanation => 'Barcode is auto-calculated',
409 uniquefieldrequired => 'variable',
410 variable => 'insecure',
411 forceupdate => { 'explanation' => 1,
415 'If YES, no auth at all is needed. Be careful if you set this to yes!',
419 uniquefieldrequired => 'variable',
420 variable => 'authoritysep',
421 forceupdate => { 'explanation' => 1,
426 'the separator used in authority/thesaurus. Usually --',
431 uniquefieldrequired => 'variable',
432 variable => 'opaclanguages',
433 forceupdate => { 'explanation' => 1,
436 explanation => 'Set the preferred order for translations. The top language will be tried first.',
440 uniquefieldrequired => 'variable',
441 variable => 'opacthemes',
442 forceupdate => { 'explanation' => 1,
445 explanation => 'Set the preferred order for themes. The top theme will be tried first.',
449 uniquefieldrequired => 'variable',
450 variable => 'timeout',
451 forceupdate => { 'explanation' => 1,
454 explanation => 'Inactivity timeout for cookies authentication (in seconds)',
458 uniquefieldrequired => 'variable',
460 forceupdate => { 'explanation' => 1,
463 explanation => 'Turn on MARC support',
467 uniquefieldrequired => 'variable',
468 variable => 'marcflavour',
469 forceupdate => { 'explanation' => 1,
474 'your MARC flavor (MARC21 or UNIMARC) used for character encoding',
476 options => 'MARC21|UNIMARC'
479 uniquefieldrequired => 'variable',
480 variable => 'checkdigit',
482 forceupdate => { 'explanation' => 1,
485 explanation => 'Validity checks on membership number: none or "Katipo" style checks',
487 options => 'none|katipo'
490 uniquefieldrequired => 'variable',
491 variable => 'maxoutstanding',
492 forceupdate => { 'explanation' => 1,
496 'maximum amount withstanding to be able make reserves ',
500 uniquefieldrequired => 'variable',
501 variable => 'maxreserves',
502 forceupdate => { 'explanation' => 1,
506 'maximum number of reserves a member can make',
511 uniquefieldrequired => 'variable',
512 variable => 'noissuescharge',
513 forceupdate => { 'explanation' => 1,
517 'maximum amount withstanding to be able to check out an item',
522 uniquefieldrequired => 'variable',
523 variable => 'KohaAdminEmailAddress',
524 forceupdate => { 'explanation' => 1,
526 value => 'your.mail@here',
527 explanation => 'the email address where borrowers modifs are sent',
531 uniquefieldrequired => 'variable',
533 forceupdate => { 'explanation' => 1,
536 explanation => 'the gist rate. NOT in %, but in numeric form (0.12 for 12%)',
543 my %fielddefinitions = (
546 field => 'printername',
555 field => 'bookfundid',
564 field => 'aqbudgetid',
565 type => 'tinyint(4)',
569 extra => 'auto_increment'
579 extra => 'auto_increment'
584 field => 'z3950random',
585 type => 'varchar(40)',
593 type => 'varchar(40)',
607 # Get version of MySQL database engine.
608 my $mysqlversion = `mysqld --version`;
609 $mysqlversion =~ /Ver (\S*) /;
611 if ( $mysqlversion ge '3.23' ) {
612 print "Could convert to MyISAM database tables...\n";
615 #---------------------------------
618 # Collect all tables into a list
619 $sth = $dbh->prepare("show tables");
621 while ( my ($table) = $sth->fetchrow ) {
622 $existingtables{$table} = 1;
626 # Now add any missing tables
627 foreach $table ( keys %requiretables ) {
628 unless ( $existingtables{$table} ) {
629 print "Adding $table table...\n";
630 my $sth = $dbh->prepare("create table $table $requiretables{$table}");
633 print "Error : $sth->errstr \n";
639 # now drop useless tables
640 foreach $table ( keys %dropable_table ) {
641 if ( $existingtables{$table} ) {
642 print "Dropping unused table $table\n" if $debug;
643 $dbh->do("drop table $table");
645 print "Error : $dbh->errstr \n";
649 unless ( $existingtables{'z3950servers'} ) {
650 #MJR: added syntax entries to close bug 624
651 print "Adding z3950servers table...\n";
652 my $sti = $dbh->prepare( "create table z3950servers (
665 $sti = $dbh->prepare( "insert into z3950servers
666 values ('z3950.loc.gov',
670 'Library of Congress',
676 #---------------------------------
679 foreach $table ( keys %requirefields ) {
680 print "Check table $table\n" if $debug;
681 $sth = $dbh->prepare("show columns from $table");
684 while ( ( $column, $type, $null, $key, $default, $extra ) = $sth->fetchrow )
686 $types{$column} = $type;
688 foreach $column ( keys %{ $requirefields{$table} } ) {
689 print " Check column $column [$types{$column}]\n" if $debug;
690 if ( !$types{$column} ) {
692 # column doesn't exist
693 print "Adding $column field to $table table...\n";
694 $query = "alter table $table
695 add column $column " . $requirefields{$table}->{$column};
696 print "Execute: $query\n" if $debug;
697 my $sti = $dbh->prepare($query);
700 print "**Error : $sti->errstr \n";
707 foreach $table ( keys %fielddefinitions ) {
708 print "Check table $table\n" if $debug;
709 $sth = $dbh->prepare("show columns from $table");
712 while ( ( $column, $type, $null, $key, $default, $extra ) = $sth->fetchrow )
714 $definitions->{$column}->{type} = $type;
715 $definitions->{$column}->{null} = $null;
716 $definitions->{$column}->{key} = $key;
717 $definitions->{$column}->{default} = $default;
718 $definitions->{$column}->{extra} = $extra;
720 my $fieldrow = $fielddefinitions{$table};
721 foreach my $row (@$fieldrow) {
722 my $field = $row->{field};
723 my $type = $row->{type};
724 my $null = $row->{null};
725 my $key = $row->{key};
726 my $default = $row->{default};
727 $default="''" unless $default;
728 my $extra = $row->{extra};
729 my $def = $definitions->{$field};
730 unless ( $type eq $def->{type}
731 && $null eq $def->{null}
732 && $key eq $def->{key}
733 && $default eq $def->{default}
734 && $extra eq $def->{extra} )
740 if ( $key eq 'PRI' ) {
741 $key = 'PRIMARY KEY';
743 unless ( $extra eq 'auto_increment' ) {
746 # if it's a new column use "add", if it's an old one, use "change".
748 if ($definitions->{$field}->{type}) {
749 $action="change $field"
753 # if it's a primary key, drop the previous pk, before altering the table
755 if ($key ne 'PRIMARY KEY') {
756 $sth =$dbh->prepare("alter table $table $action $field $type $null $key $extra default ?");
758 $sth =$dbh->prepare("alter table $table drop primary key, $action $field $type $null $key $extra default ?");
760 $sth->execute($default);
761 print " Alter $field in $table\n";
766 # Get list of columns from borrowers table
769 $sth = $dbh->prepare("show columns from borrowers");
771 while ( my ( $column, $type, $null, $key, $default, $extra ) = $sth->fetchrow )
773 $itemtypes{$column} = $type;
774 $nullenabled{$column} = $null;
777 unless ( $itemtypes{'cardnumber'} eq 'varchar(20)' ) {
778 $itemtypes{'cardnumber'} =~ /varchar\((\d+)\)/;
780 if ( $oldlength < 16 ) {
781 print "Setting maximum cardnumber length to 16 (was $oldlength) and marking unique.\n";
784 "alter table borrowers change cardnumber cardnumber varchar(16)");
789 "alter table borrowers drop index cardnumber");
794 "alter table borrowers add unique(cardnumber)");
800 # Get list of columns from items table
801 $sth = $dbh->prepare("show columns from items");
803 while ( my ( $column, $type, $null, $key, $default, $extra ) = $sth->fetchrow )
805 $itemtypes{$column} = $type;
806 $nullenabled{$column} = $null;
809 unless ( $itemtypes{'barcode'} eq 'varchar(20)' ) {
810 $itemtypes{'barcode'} =~ /varchar\((\d+)\)/;
812 if ( $oldlength < 20 ) {
813 print "Setting maximum barcode length to 20 (was $oldlength).\n";
816 "alter table items change barcode barcode varchar(20)");
821 # dropping unique barcode index & setting barcode to null allowed.
823 $sth = $dbh->prepare("show index from items");
825 while ( my ( $table, $non_unique, $key_name, $Seq_in_index, $Column_name, $Collation, $cardinality, $sub_part, $Packed, $comment ) = $sth->fetchrow )
827 if ($key_name eq 'barcode' && $non_unique eq 0) {
828 print "dropping BARCODE index to enable empty barcodes\n";
829 $dbh->do("ALTER TABLE `items` DROP INDEX `barcode`");
832 $dbh->do("ALTER TABLE `items` CHANGE `barcode` `barcode` VARCHAR( 20 )") unless ($nullenabled{barcode} eq 'YES');
835 # creating fulltext index in bibliothesaurus if needed
837 $sth = $dbh->prepare("show index from bibliothesaurus");
840 while ( my ( $table, $non_unique, $key_name, $Seq_in_index, $Column_name, $Collation, $cardinality, $sub_part, $Packed, $comment ) = $sth->fetchrow )
842 if ($key_name eq 'category_2') {
846 print "Creating fulltext index on bibliothesaurus\n" unless $exists;
847 $dbh->do('create fulltext index category_2 on bibliothesaurus (category,freelib)') unless $exists;
849 # changing z3950daemon field to NULL in marc_breeding
850 $dbh->do("ALTER TABLE `marc_breeding` CHANGE `z3950random` `z3950random` VARCHAR( 40 )");
852 # making borrowernumber an auto_increment field
853 $dbh->do("ALTER TABLE `borrowers` CHANGE `borrowernumber` `borrowernumber` INTEGER auto_increment");
855 # extending the timestamp in branchtransfers...
858 $sth = $dbh->prepare("show columns from branchtransfers");
860 while ( my ( $column, $type, $null, $key, $default, $extra ) = $sth->fetchrow )
862 $branchtransfers{$column} = $type;
865 unless ( $branchtransfers{'datesent'} eq 'datetime' ) {
866 print "Setting type of datesent in branchtransfers to datetime.\n";
869 "alter table branchtransfers change datesent datesent datetime");
873 unless ( $branchtransfers{'datearrived'} eq 'datetime' ) {
874 print "Setting type of datearrived in branchtransfers to datetime.\n";
877 "alter table branchtransfers change datearrived datearrived datetime");
881 # changing the branchcategories table around...
882 my %branchcategories;
884 $sth = $dbh->prepare("show columns from branchcategories");
886 while ( my ( $column, $type, $null, $key, $default, $extra ) = $sth->fetchrow )
888 $branchcategories{$column} = $type;
891 unless ( $branchcategories{'categorycode'} eq 'varchar(4)' ) {
893 "Setting type of categorycode in branchcategories to varchar(4),\n and making the primary key.\n";
896 "alter table branchcategories change categorycode categorycode varchar(4) not null"
901 "alter table branchcategories add primary key (categorycode)");
905 unless ( $branchcategories{'categoryname'} eq 'text' ) {
906 print "Changing branchcode in branchcategories to categoryname text.\n";
909 "alter table branchcategories change branchcode categoryname text");
913 unless ( $branchcategories{'codedescription'} eq 'text' ) {
915 "Replacing branchholding in branchcategories with codedescription text.\n";
918 "alter table branchcategories change branchholding codedescription text"
923 # Populate tables with required data
925 foreach my $table ( keys %tabledata ) {
926 print "Checking for data required in table $table...\n";
927 my $tablerows = $tabledata{$table};
928 foreach my $row (@$tablerows) {
929 my $uniquefieldrequired = $row->{uniquefieldrequired};
930 my $uniquevalue = $row->{$uniquefieldrequired};
931 my $forceupdate = $row->{forceupdate};
934 "select $uniquefieldrequired from $table where $uniquefieldrequired=?"
936 $sth->execute($uniquevalue);
938 foreach my $field (keys %$forceupdate) {
939 if ($forceupdate->{$field}) {
940 my $sth=$dbh->prepare("update systempreferences set $field=? where $uniquefieldrequired=?");
941 $sth->execute($row->{$field}, $uniquevalue);
945 print "Adding row to $table: ";
949 foreach my $field ( keys %$row ) {
950 next if $field eq 'uniquefieldrequired';
951 next if $field eq 'forceupdate';
952 my $value = $row->{$field};
953 push @values, $value;
954 print " $field => $value";
955 $fieldlist .= "$field,";
956 $placeholders .= "?,";
959 $fieldlist =~ s/,$//;
960 $placeholders =~ s/,$//;
963 "insert into $table ($fieldlist) values ($placeholders)");
964 $sth->execute(@values);
974 # Revision 1.69 2003/12/04 12:51:41 tipaul
975 # setting default acquisition to NORMAL, which is better, imho (it's always possible to add a biblio directly through catalogue menu entry)
977 # Revision 1.68 2003/12/03 17:47:14 tipaul
978 # bugfixes for biblio deletion
980 # Revision 1.67 2003/11/28 10:08:33 tipaul
981 # * removing too verbose messages.
982 # * creating a fulltext index on bibliothesaurus
984 # Revision 1.66 2003/11/12 16:14:42 slef
985 # lengthen cardnumber to 16 and make it unique
987 # Revision 1.65 2003/11/06 15:07:11 tipaul
988 # adding marc fields in deletedbiblio & deleteditems
990 # Revision 1.64 2003/10/23 20:33:53 rangi
991 # Making the borrowenumber an auto_increment field
993 # Revision 1.63 2003/10/20 16:13:01 slef
994 # Omitted annotation added. Closes: 624
996 # Revision 1.62 2003/10/20 16:10:19 slef
997 # Adding USMARC to LOC z3950 entry
999 # Revision 1.61 2003/10/01 15:03:45 tipaul
1000 # oups... typo fix in z3950random field definition
1002 # Revision 1.59 2003/09/30 16:22:05 tipaul
1003 # adding barcode NOT mandatory feature. Just run updatedatabase to get it.
1004 # Note it's impossible to issue an item without barcode, as issue/returns is based on barcode...
1006 # Revision 1.58 2003/07/16 04:08:29 acli
1007 # Minor spelling correction
1009 # Revision 1.57 2003/07/11 11:50:29 tipaul
1010 # fixing a bug that occured when adding a field into a table.
1012 # Revision 1.56 2003/07/07 15:37:20 tipaul
1013 # *** empty log message ***
1015 # Revision 1.53 2003/07/07 14:11:16 tipaul
1016 # fixing bug #526 : gst rate is now calculated through systempref gist entry.
1018 # * was harcoded to 12,5%
1019 # * some bugs in template parameters prevented the javascript to work.
1020 # * some bugs prevented some calculations to be done properly.
1022 # Revision 1.52 2003/06/23 15:54:32 tipaul
1023 # *** empty log message ***
1025 # Revision 1.51 2003/06/23 11:27:29 tipaul
1026 # *** empty log message ***
1028 # Revision 1.50 2003/06/11 21:28:22 tonnesen
1029 # Added modifications required to the systempreferences table by the new
1030 # systempreferences.pl script. The systempreferences.pl script will not work
1031 # properly until this table is updated.
1033 # Revision 1.49 2003/05/26 10:41:53 tipaul
1034 # bugfix : borrowers modifs overwritten by stupid hash entry existing twice.
1036 # Revision 1.48 2003/05/20 19:50:45 slef
1037 # Initial fix to bug 456: hardwired paths
1039 # Revision 1.47 2003/05/15 12:23:33 tipaul
1040 # adding zipcode and homezipcode into borrowers table (bug #246
1042 # Revision 1.46 2003/05/08 12:48:24 wolfpac444
1043 # Added "noissuescharge" parameter
1045 # Revision 1.45 2003/05/08 12:26:16 wolfpac444
1048 # Revision 1.44 2003/05/03 05:39:57 rangi
1050 # (Wording changes in the explanation fields in system preferences)
1052 # Revision 1.43 2003/05/02 23:01:09 rangi
1053 # Adding the textmessaging column to the borrowers table.
1054 # insertdata.pl is expecting this to exist, and hence modifying/adding
1055 # borrowers was broken.
1057 # Also ran they script thru perltidy
1059 # Revision 1.42 2003/04/29 16:53:25 tipaul
1060 # really proud of this commit :-)
1061 # z3950 search and import seems to works fine.
1062 # Let me explain how :
1063 # * a "search z3950" button is added in the addbiblio template.
1064 # * when clicked, a popup appears and z3950/search.pl is called
1065 # * z3950/search.pl calls addz3950search in the DB
1066 # * the z3950 daemon retrieve the records and stores them in z3950results AND in marc_breeding table.
1067 # * as long as there as searches pending, the popup auto refresh every 2 seconds, and says how many searches are pending.
1068 # * when the user clicks on a z3950 result => the parent popup is called with the requested biblio, and auto-filled
1071 # * 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.
1072 # * 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.
1074 # Revision 1.41 2003/04/29 08:09:44 tipaul
1075 # z3950 support is coming...
1076 # * 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.
1077 # Note this is a 1st draft. More to follow (today ? I hope).
1079 # Revision 1.40 2003/04/22 10:48:27 wolfpac444
1080 # Added "father" column to bibliothesaurus table
1082 # Revision 1.39 2003/04/04 08:45:00 tipaul
1083 # last commits before 1.9.1
1085 # Revision 1.38 2003/03/18 10:58:19 tipaul
1086 # adding checkdigit parameter that choose how to check the members cardnumber.
1088 # * none = no checking
1089 # * katipo = checked as before
1091 # Revision 1.37 2003/01/30 01:47:48 acli
1092 # Corrected syntax error reported by Benedict
1094 # Made the indentation somewhat easier to read; the messiness probably caused
1095 # the original syntax error.
1097 # Revision 1.36 2003/01/28 15:13:30 tipaul
1098 # userflag table now created in upgrade script (bugfix #171)
1100 # Revision 1.35 2003/01/27 03:12:49 acli
1101 # Reworded the description for "acquisitions" to make it fit on the screen
1103 # Added "iso" to dateformat, since dateformat is not yet being used anyway
1105 # Revision 1.34 2003/01/23 12:30:02 tipaul
1106 # introducint marcflavour in systempref file : used for character decoding
1108 # Revision 1.33 2003/01/21 09:03:27 tipaul
1109 # bugfix (NOTE : this bugs makes installation of the 1.3.3 a little fuzzy. Please fix your DB if you installed 1.3.3)
1111 # Revision 1.32 2003/01/16 10:29:45 tipaul
1112 # adding a MARC parameter in systempref ( which is ON or OFF)
1113 # the search will be a marc search if MARC=ON
1114 # and a standard (v1.2) search if MARC=OFF
1116 # Revision 1.31 2003/01/06 13:32:43 tipaul
1117 # *** empty log message ***
1119 # Revision 1.29 2003/01/06 11:14:11 tipaul
1120 # last bugfixes before 1.3.3 : systempref table correctly filled
1122 # Revision 1.28 2002/12/10 13:27:47 tipaul
1123 # bugfixes (davide mails in koha-dev)
1125 # Revision 1.27 2002/11/26 15:04:54 tipaul
1126 # road to 1.3.2. Updating db structure during installation
1128 # Revision 1.26 2002/11/12 17:42:40 tonnesen
1129 # Merged some features over from rel-1-2, including primary key checking.
1131 # Revision 1.25 2002/11/12 16:44:38 tipaul
1134 # * 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)
1136 # Revision 1.24 2002/10/30 14:00:23 arensb
1137 # (bug fix): Fixed typo.
1139 # Revision 1.23 2002/10/25 10:55:46 tipaul
1141 # * bugfixes and improvements
1142 # * manage mandatory MARC subfields
1143 # * 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.
1144 # this submit contains everything needed :
1147 # * "links" management
1148 # * creation of a html-list if a subfield is mapped to an authorised value.
1150 # Note this is different from authorities support, which will come soon.
1151 # 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...
1153 # Revision 1.22 2002/10/15 10:08:19 tipaul
1154 # fixme corrected, re-indent and adding the marc_breeding table (see commit of marcimport.pl for more explanations about breeding)
1156 # Revision 1.21 2002/10/14 11:48:59 tipaul
1159 # Revision 1.20 2002/10/10 04:49:41 arensb
1160 # Added some FIXME comments.
1162 # Revision 1.19 2002/10/05 10:17:17 arensb
1163 # Merged with arensb-context branch: use C4::Context->dbh instead of
1164 # &C4Connect, and generally prefer C4::Context over C4::Database.
1166 # Revision 1.18.2.2 2002/10/05 06:18:43 arensb
1167 # Added a whole mess of FIXME comments.
1169 # Revision 1.18.2.1 2002/10/04 02:46:00 arensb
1170 # Use C4::Connect instead of C4::Database, C4::Connect->dbh instead
1173 # Revision 1.18 2002/09/24 13:50:55 tipaul
1174 # long WAS the road to 1.3.0...
1175 # coming VERY SOON NOW...
1176 # modifying installer and buildrelease to update the DB
1178 # Revision 1.17 2002/09/24 12:57:35 tipaul
1179 # long WAS the road to 1.3.0...
1180 # coming VERY SOON NOW...
1181 # modifying installer and buildrelease to update the DB
1183 # Revision 1.16 2002/07/31 02:34:27 finlayt
1185 # added "notforloan" field to the itemtypes table.
1187 # Revision 1.15 2002/07/20 22:30:06 rangi
1188 # Making sure fix makes it into the main branch as well
1191 # Revision 1.14 2002/07/08 16:20:26 tonnesen
1192 # Added sessionqueries table and password/userid fields to borrowers table
1194 # Revision 1.13 2002/07/04 18:05:36 tonnesen
1197 # Revision 1.12 2002/07/04 16:41:06 tonnesen
1198 # Merged changes from rel-1-2. Abstracted table structure changes by alan.