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

(-)a/C4/ClassSortRoutine.pm (-1 / +1 lines)
Lines 101-107 sub GetClassSortKey { Link Here
101
    # should replace with some way of getting column widths from
101
    # should replace with some way of getting column widths from
102
    # the DB schema -- since doing this should ideally be
102
    # the DB schema -- since doing this should ideally be
103
    # independent of the DBMS, deferring for the moment.
103
    # independent of the DBMS, deferring for the moment.
104
    return substr($key, 0, 30);
104
    return substr($key, 0, 255);
105
}
105
}
106
106
107
=head2 _get_class_sort_key 
107
=head2 _get_class_sort_key 
(-)a/installer/data/mysql/kohastructure.sql
Lines 2-8 Link Here
2
--
2
--
3
-- Host: localhost    Database: koha30test
3
-- Host: localhost    Database: koha30test
4
-- ------------------------------------------------------
4
-- ------------------------------------------------------
(-)Server version (-13 / +12 lines)
Lines 911-917 CREATE TABLE `deleteditems` ( Link Here
911
  `permanent_location` varchar(80) default NULL, -- linked to the CART and PROC temporary locations feature, stores the permanent shelving location
911
  `permanent_location` varchar(80) default NULL, -- linked to the CART and PROC temporary locations feature, stores the permanent shelving location
912
  `onloan` date default NULL, -- defines if item is checked out (NULL for not checked out, and checkout date for checked out)
912
  `onloan` date default NULL, -- defines if item is checked out (NULL for not checked out, and checkout date for checked out)
913
  `cn_source` varchar(10) default NULL, -- classification source used on this item (MARC21 952$2)
913
  `cn_source` varchar(10) default NULL, -- classification source used on this item (MARC21 952$2)
914
  `cn_sort` varchar(30) default NULL, -- normalized form of the call number (MARC21 952$o) used for sorting
914
  `cn_sort` varchar(255) default NULL, -- normalized form of the call number (MARC21 952$o) used for sorting
915
  `ccode` varchar(10) default NULL, -- authorized value for the collection code associated with this item (MARC21 952$8)
915
  `ccode` varchar(10) default NULL, -- authorized value for the collection code associated with this item (MARC21 952$8)
916
  `materials` text default NULL, -- materials specified (MARC21 952$3)
916
  `materials` text default NULL, -- materials specified (MARC21 952$3)
917
  `uri` varchar(255) default NULL, -- URL for the item (MARC21 952$u)
917
  `uri` varchar(255) default NULL, -- URL for the item (MARC21 952$u)
Lines 1207-1213 CREATE TABLE `items` ( -- holdings/item information Link Here
1207
  `permanent_location` varchar(80) default NULL, -- linked to the CART and PROC temporary locations feature, stores the permanent shelving location
1207
  `permanent_location` varchar(80) default NULL, -- linked to the CART and PROC temporary locations feature, stores the permanent shelving location
1208
  `onloan` date default NULL, -- defines if item is checked out (NULL for not checked out, and checkout date for checked out)
1208
  `onloan` date default NULL, -- defines if item is checked out (NULL for not checked out, and checkout date for checked out)
1209
  `cn_source` varchar(10) default NULL, -- classification source used on this item (MARC21 952$2)
1209
  `cn_source` varchar(10) default NULL, -- classification source used on this item (MARC21 952$2)
1210
  `cn_sort` varchar(30) default NULL,  -- normalized form of the call number (MARC21 952$o) used for sorting
1210
  `cn_sort` varchar(255) default NULL,  -- normalized form of the call number (MARC21 952$o) used for sorting
1211
  `ccode` varchar(10) default NULL, -- authorized value for the collection code associated with this item (MARC21 952$8)
1211
  `ccode` varchar(10) default NULL, -- authorized value for the collection code associated with this item (MARC21 952$8)
1212
  `materials` text default NULL, -- materials specified (MARC21 952$3)
1212
  `materials` text default NULL, -- materials specified (MARC21 952$3)
1213
  `uri` varchar(255) default NULL, -- URL for the item (MARC21 952$u)
1213
  `uri` varchar(255) default NULL, -- URL for the item (MARC21 952$u)
Lines 2174-2183 CREATE TABLE `suggestions` ( -- purchase suggestions Link Here
2174
   branchcode VARCHAR(10) default NULL, -- foreign key linking the suggested branch to the branches table
2174
   branchcode VARCHAR(10) default NULL, -- foreign key linking the suggested branch to the branches table
2175
   collectiontitle text default NULL, -- collection name for the suggested item
2175
   collectiontitle text default NULL, -- collection name for the suggested item
2176
   itemtype VARCHAR(30) default NULL, -- suggested item type 
2176
   itemtype VARCHAR(30) default NULL, -- suggested item type 
2177
	quantity SMALLINT(6) default NULL, -- suggested quantity to be purchased
2177
    quantity SMALLINT(6) default NULL, -- suggested quantity to be purchased
2178
	currency VARCHAR(3) default NULL, -- suggested currency for the suggested price
2178
    currency VARCHAR(3) default NULL, -- suggested currency for the suggested price
2179
	price DECIMAL(28,6) default NULL, -- suggested price
2179
    price DECIMAL(28,6) default NULL, -- suggested price
2180
	total DECIMAL(28,6) default NULL, -- suggested total cost (price*quantity updated for currency)
2180
    total DECIMAL(28,6) default NULL, -- suggested total cost (price*quantity updated for currency)
2181
  PRIMARY KEY  (`suggestionid`),
2181
  PRIMARY KEY  (`suggestionid`),
2182
  KEY `suggestedby` (`suggestedby`),
2182
  KEY `suggestedby` (`suggestedby`),
2183
  KEY `managedby` (`managedby`)
2183
  KEY `managedby` (`managedby`)
Lines 2475-2486 CREATE TABLE `permissions` ( Link Here
2475
2475
2476
DROP TABLE IF EXISTS `serialitems`;
2476
DROP TABLE IF EXISTS `serialitems`;
2477
CREATE TABLE `serialitems` (
2477
CREATE TABLE `serialitems` (
2478
	`itemnumber` int(11) NOT NULL,
2478
    `itemnumber` int(11) NOT NULL,
2479
	`serialid` int(11) NOT NULL,
2479
    `serialid` int(11) NOT NULL,
2480
	UNIQUE KEY `serialitemsidx` (`itemnumber`),
2480
    UNIQUE KEY `serialitemsidx` (`itemnumber`),
2481
	KEY `serialitems_sfk_1` (`serialid`),
2481
    KEY `serialitems_sfk_1` (`serialid`),
2482
	CONSTRAINT `serialitems_sfk_1` FOREIGN KEY (`serialid`) REFERENCES `serial` (`serialid`) ON DELETE CASCADE ON UPDATE CASCADE,
2482
    CONSTRAINT `serialitems_sfk_1` FOREIGN KEY (`serialid`) REFERENCES `serial` (`serialid`) ON DELETE CASCADE ON UPDATE CASCADE,
2483
	CONSTRAINT `serialitems_sfk_2` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE CASCADE ON UPDATE CASCADE
2483
    CONSTRAINT `serialitems_sfk_2` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE CASCADE ON UPDATE CASCADE
2484
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2484
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2485
2485
2486
--
2486
--
Lines 3430-3433 CREATE TABLE IF NOT EXISTS `misc_files` ( -- miscellaneous files attached to rec Link Here
3430
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
3430
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
3431
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
3431
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
3432
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
3432
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
3433
(-)a/installer/data/mysql/updatedatabase.pl (-1 / +8 lines)
Lines 8603-8608 if ( CheckVersion($DBversion) ) { Link Here
8603
    SetVersion($DBversion);
8603
    SetVersion($DBversion);
8604
}
8604
}
8605
8605
8606
$DBversion = "XXX";
8607
if ( CheckVersion($DBversion) ) {
8608
    $dbh->do("ALTER TABLE  `items` CHANGE  `cn_sort`  `cn_sort` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL");
8609
    $dbh->do("ALTER TABLE  `deleteditems` CHANGE  `cn_sort`  `cn_sort` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL");
8610
    print "Upgrade to $DBversion done (Bug 12424 - ddc sorting of call numbers truncates long Cutter parts)\n";
8611
    SetVersion ($DBversion);
8612
}
8613
8606
=head1 FUNCTIONS
8614
=head1 FUNCTIONS
8607
8615
8608
=head2 TableExists($table)
8616
=head2 TableExists($table)
8609
- 

Return to bug 12424