View | Details | Raw Unified | Return to bug 6536
Collapse All | Expand All

(-)a/installer/data/mysql/kohastructure.sql (-4 / +6 lines)
Lines 2007-2027 CREATE TABLE `virtualshelfcontents` ( -- information about the titles in a list Link Here
2007
2007
2008
DROP TABLE IF EXISTS `z3950servers`;
2008
DROP TABLE IF EXISTS `z3950servers`;
2009
CREATE TABLE `z3950servers` ( -- connection information for the Z39.50 targets used in cataloging
2009
CREATE TABLE `z3950servers` ( -- connection information for the Z39.50 targets used in cataloging
2010
  `host` varchar(255) default NULL, -- target's host name
2010
  `host` varchar(255) NOT NULL, -- target's host name
2011
  `port` int(11) default NULL, -- port number used to connect to target
2011
  `port` int(11) default NULL, -- port number used to connect to target
2012
  `db` varchar(255) default NULL, -- target's database name
2012
  `db` varchar(255) default NULL, -- target's database name
2013
  `userid` varchar(255) default NULL, -- username needed to log in to target
2013
  `userid` varchar(255) default NULL, -- username needed to log in to target
2014
  `password` varchar(255) default NULL, -- password needed to log in to target
2014
  `password` varchar(255) default NULL, -- password needed to log in to target
2015
  `name` mediumtext, -- name given to the target by the library
2015
  `name` mediumtext NOT NULL, -- name given to the target by the library
2016
  `id` int(11) NOT NULL auto_increment, -- unique identifier assigned by Koha
2016
  `id` int(11) NOT NULL auto_increment, -- unique identifier assigned by Koha
2017
  `checked` smallint(6) default NULL, -- whether this target is checked by default  (1 for yes, 0 for no)
2017
  `checked` smallint(6) default NULL, -- whether this target is checked by default  (1 for yes, 0 for no)
2018
  `rank` int(11) default NULL, -- where this target appears in the list of targets
2018
  `rank` int(11) default NULL, -- where this target appears in the list of targets
2019
  `syntax` varchar(80) default NULL, -- marc format provided by this target
2019
  `syntax` varchar(80) NOT NULL, -- marc format provided by this target
2020
  `icon` text, -- unused in Koha
2020
  `icon` text, -- unused in Koha
2021
  `position` enum('primary','secondary','') NOT NULL default 'primary',
2021
  `position` enum('primary','secondary','') NOT NULL default 'primary',
2022
  `type` enum('zed','opensearch') NOT NULL default 'zed',
2022
  `type` enum('zed','opensearch') NOT NULL default 'zed',
2023
  `encoding` text default NULL, -- characters encoding provided by this target
2023
  `encoding` text NOT NULL, -- characters encoding provided by this target
2024
  `description` text NOT NULL, -- unused in Koha
2024
  `description` text NOT NULL, -- unused in Koha
2025
  `srufields` text, -- list for matching Koha search fields with sru indexes
2026
  `add_xslt` varchar(255), -- name of optional xslt transformation to apply
2025
  PRIMARY KEY  (`id`)
2027
  PRIMARY KEY  (`id`)
2026
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2028
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2027
2029
(-)a/installer/data/mysql/updatedatabase.pl (-1 / +12 lines)
Lines 4578-4583 if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { Link Here
4578
    SetVersion($DBversion);
4578
    SetVersion($DBversion);
4579
}
4579
}
4580
4580
4581
$DBversion = "3.06.XX.XXX"; #FIXME
4582
if(C4::Context->preference("Version") lt TransformToNum($DBversion)) {
4583
  $dbh->do("ALTER TABLE z3950servers MODIFY COLUMN `host` varchar(255) NOT NULL;");
4584
  $dbh->do("ALTER TABLE z3950servers MODIFY COLUMN `name` mediumtext NOT NULL;");
4585
  $dbh->do("ALTER TABLE z3950servers MODIFY COLUMN `syntax` varchar(80) NOT NULL;");
4586
  $dbh->do("ALTER TABLE z3950servers MODIFY COLUMN `encoding` text NOT NULL;");
4587
  $dbh->do("ALTER TABLE z3950servers ADD COLUMN `srufields` text;");
4588
  $dbh->do("ALTER TABLE z3950servers ADD COLUMN `add_xslt` varchar(255);");
4589
  print "Upgrade to $DBversion done (Bug 6536: Z3950 enhancements)\n";
4590
  #SetVersion ($DBversion); #FIXME
4591
}
4592
4581
=head1 FUNCTIONS
4593
=head1 FUNCTIONS
4582
4594
4583
=head2 DropAllForeignKeys($table)
4595
=head2 DropAllForeignKeys($table)
4584
- 

Return to bug 6536