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

(-)a/installer/data/mysql/kohastructure.sql (-7 / +7 lines)
Lines 2334-2356 CREATE TABLE `virtualshelfshares` ( -- shared private lists Link Here
2334
2334
2335
DROP TABLE IF EXISTS `z3950servers`;
2335
DROP TABLE IF EXISTS `z3950servers`;
2336
CREATE TABLE `z3950servers` ( -- connection information for the Z39.50 targets used in cataloging
2336
CREATE TABLE `z3950servers` ( -- connection information for the Z39.50 targets used in cataloging
2337
  `id` int(11) NOT NULL auto_increment, -- unique identifier assigned by Koha
2337
  `host` varchar(255) default NULL, -- target's host name
2338
  `host` varchar(255) default NULL, -- target's host name
2338
  `port` int(11) default NULL, -- port number used to connect to target
2339
  `port` int(11) default NULL, -- port number used to connect to target
2339
  `db` varchar(255) default NULL, -- target's database name
2340
  `db` varchar(255) default NULL, -- target's database name
2340
  `userid` varchar(255) default NULL, -- username needed to log in to target
2341
  `userid` varchar(255) default NULL, -- username needed to log in to target
2341
  `password` varchar(255) default NULL, -- password needed to log in to target
2342
  `password` varchar(255) default NULL, -- password needed to log in to target
2342
  `name` mediumtext, -- name given to the target by the library
2343
  `servername` mediumtext NOT NULL, -- name given to the target by the library
2343
  `id` int(11) NOT NULL auto_increment, -- unique identifier assigned by Koha
2344
  `checked` smallint(6) default NULL, -- whether this target is checked by default  (1 for yes, 0 for no)
2344
  `checked` smallint(6) default NULL, -- whether this target is checked by default  (1 for yes, 0 for no)
2345
  `rank` int(11) default NULL, -- where this target appears in the list of targets
2345
  `rank` int(11) default NULL, -- where this target appears in the list of targets
2346
  `syntax` varchar(80) default NULL, -- marc format provided by this target
2346
  `syntax` varchar(80) default NULL, -- marc format provided by this target
2347
  `timeout` int(11) NOT NULL DEFAULT '0', -- number of seconds before Koha stops trying to access this server
2347
  `timeout` int(11) NOT NULL DEFAULT '0', -- number of seconds before Koha stops trying to access this server
2348
  `icon` text, -- unused in Koha
2348
  `servertype` enum('zed','sru') NOT NULL default 'zed', -- zed means z39.50 server
2349
  `position` enum('primary','secondary','') NOT NULL default 'primary',
2350
  `type` enum('zed','opensearch') NOT NULL default 'zed',
2351
  `encoding` text default NULL, -- characters encoding provided by this target
2349
  `encoding` text default NULL, -- characters encoding provided by this target
2352
  `description` text NOT NULL, -- unused in Koha
2350
  `recordtype` enum('authority','biblio') NOT NULL default 'biblio', -- server contains bibliographic or authority records
2353
  `recordtype` varchar(45) NOT NULL default 'biblio', -- server contains bibliographic or authority records
2351
  `sru_options` varchar(255) default NULL, -- options like sru=get, sru_version=1.1; will be passed to the server via ZOOM
2352
  `sru_fields` mediumtext default NULL, -- contains the mapping between the Z3950 search fields and the specific SRU server indexes
2353
  `add_xslt` mediumtext default NULL, -- zero or more paths to XSLT files to be processed on the search results
2354
  PRIMARY KEY  (`id`)
2354
  PRIMARY KEY  (`id`)
2355
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2355
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2356
2356
(-)a/installer/data/mysql/updatedatabase.pl (-1 / +29 lines)
Lines 8574-8579 $DBversion = "3.17.00.010"; Link Here
8574
if ( CheckVersion($DBversion) ) {
8574
if ( CheckVersion($DBversion) ) {
8575
    $dbh->do("DELETE FROM systempreferences WHERE variable='opacsmallimage'");
8575
    $dbh->do("DELETE FROM systempreferences WHERE variable='opacsmallimage'");
8576
    print "Upgrade to $DBversion done (Bug 11347 - PROG/CCSR deprecation: Remove opacsmallimage system preference)\n";
8576
    print "Upgrade to $DBversion done (Bug 11347 - PROG/CCSR deprecation: Remove opacsmallimage system preference)\n";
8577
    SetVersion($DBversion);
8578
}
8579
8580
8581
$DBversion = "3.17.00.XXX";
8582
if ( CheckVersion($DBversion) ) {
8583
    # Correct invalid recordtypes (should be very exceptional)
8584
    $dbh->do(q{
8585
        UPDATE z3950servers set recordtype='biblio' WHERE recordtype NOT IN ('authority','biblio')
8586
    });
8587
    # Correct invalid server types (should also be very exceptional)
8588
    $dbh->do(q{
8589
        UPDATE z3950servers set type='zed' WHERE type <> 'zed'
8590
    });
8591
    # Adjust table
8592
    $dbh->do(q{
8593
        ALTER TABLE z3950servers
8594
        DROP COLUMN icon,
8595
        DROP COLUMN description,
8596
        DROP COLUMN position,
8597
        MODIFY COLUMN id int NOT NULL AUTO_INCREMENT FIRST,
8598
        MODIFY COLUMN recordtype enum('authority','biblio') NOT NULL DEFAULT 'biblio',
8599
        CHANGE COLUMN name servername mediumtext NOT NULL,
8600
        CHANGE COLUMN type servertype enum('zed','sru') NOT NULL DEFAULT 'zed',
8601
        ADD COLUMN sru_options varchar(255) default NULL,
8602
        ADD COLUMN sru_fields mediumtext default NULL,
8603
        ADD COLUMN add_xslt mediumtext default NULL
8604
    });
8605
    print "Upgrade to $DBversion done (Bug 6536: Z3950 improvements)\n";
8577
    SetVersion ($DBversion);
8606
    SetVersion ($DBversion);
8578
}
8607
}
8579
8608
8580
- 

Return to bug 6536