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 (-15 / +14 lines)
Lines 178-184 CREATE TABLE `biblioitems` ( -- information related to bibliographic records in Link Here
178
  `cn_class` varchar(30) default NULL,
178
  `cn_class` varchar(30) default NULL,
179
  `cn_item` varchar(10) default NULL,
179
  `cn_item` varchar(10) default NULL,
180
  `cn_suffix` varchar(10) default NULL,
180
  `cn_suffix` varchar(10) default NULL,
181
  `cn_sort` varchar(30) default NULL, -- normalized version of the call number used for sorting
181
  `cn_sort` varchar(255) default NULL, -- normalized version of the call number used for sorting
182
  `agerestriction` varchar(255) default NULL, -- target audience/age restriction from the bib record (MARC21 521$a)
182
  `agerestriction` varchar(255) default NULL, -- target audience/age restriction from the bib record (MARC21 521$a)
183
  `totalissues` int(10),
183
  `totalissues` int(10),
184
  `marcxml` longtext NOT NULL, -- full bibliographic MARC record in MARCXML
184
  `marcxml` longtext NOT NULL, -- full bibliographic MARC record in MARCXML
Lines 783-789 CREATE TABLE `deletedbiblioitems` ( -- information about bibliographic records t Link Here
783
  `cn_class` varchar(30) default NULL,
783
  `cn_class` varchar(30) default NULL,
784
  `cn_item` varchar(10) default NULL,
784
  `cn_item` varchar(10) default NULL,
785
  `cn_suffix` varchar(10) default NULL,
785
  `cn_suffix` varchar(10) default NULL,
786
  `cn_sort` varchar(30) default NULL, -- normalized version of the call number used for sorting
786
  `cn_sort` varchar(255) default NULL, -- normalized version of the call number used for sorting
787
  `agerestriction` varchar(255) default NULL, -- target audience/age restriction from the bib record (MARC21 521$a)
787
  `agerestriction` varchar(255) default NULL, -- target audience/age restriction from the bib record (MARC21 521$a)
788
  `totalissues` int(10),
788
  `totalissues` int(10),
789
  `marcxml` longtext NOT NULL, -- full bibliographic MARC record in MARCXML
789
  `marcxml` longtext NOT NULL, -- full bibliographic MARC record in MARCXML
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 / +10 lines)
Lines 8613-8618 if ( CheckVersion($DBversion) ) { Link Here
8613
    SetVersion($DBversion);
8613
    SetVersion($DBversion);
8614
}
8614
}
8615
8615
8616
$DBversion = "XXX";
8617
if ( CheckVersion($DBversion) ) {
8618
    $dbh->do("ALTER TABLE  `items` CHANGE  `cn_sort`  `cn_sort` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL");
8619
    $dbh->do("ALTER TABLE  `deleteditems` CHANGE  `cn_sort`  `cn_sort` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL");
8620
    $dbh->do("ALTER TABLE  `biblioitems` CHANGE  `cn_sort`  `cn_sort` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL");
8621
    $dbh->do("ALTER TABLE  `deletedbiblioitems` CHANGE  `cn_sort`  `cn_sort` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL");
8622
    print "Upgrade to $DBversion done (Bug 12424 - ddc sorting of call numbers truncates long Cutter parts)\n";
8623
    SetVersion ($DBversion);
8624
}
8625
8616
=head1 FUNCTIONS
8626
=head1 FUNCTIONS
8617
8627
8618
=head2 TableExists($table)
8628
=head2 TableExists($table)
8619
- 

Return to bug 12424