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 1209-1215 CREATE TABLE `items` ( -- holdings/item information Link Here
1209
  `permanent_location` varchar(80) default NULL, -- linked to the CART and PROC temporary locations feature, stores the permanent shelving location
1209
  `permanent_location` varchar(80) default NULL, -- linked to the CART and PROC temporary locations feature, stores the permanent shelving location
1210
  `onloan` date default NULL, -- defines if item is checked out (NULL for not checked out, and checkout date for checked out)
1210
  `onloan` date default NULL, -- defines if item is checked out (NULL for not checked out, and checkout date for checked out)
1211
  `cn_source` varchar(10) default NULL, -- classification source used on this item (MARC21 952$2)
1211
  `cn_source` varchar(10) default NULL, -- classification source used on this item (MARC21 952$2)
1212
  `cn_sort` varchar(30) default NULL,  -- normalized form of the call number (MARC21 952$o) used for sorting
1212
  `cn_sort` varchar(255) default NULL,  -- normalized form of the call number (MARC21 952$o) used for sorting
1213
  `ccode` varchar(10) default NULL, -- authorized value for the collection code associated with this item (MARC21 952$8)
1213
  `ccode` varchar(10) default NULL, -- authorized value for the collection code associated with this item (MARC21 952$8)
1214
  `materials` text default NULL, -- materials specified (MARC21 952$3)
1214
  `materials` text default NULL, -- materials specified (MARC21 952$3)
1215
  `uri` varchar(255) default NULL, -- URL for the item (MARC21 952$u)
1215
  `uri` varchar(255) default NULL, -- URL for the item (MARC21 952$u)
Lines 2177-2186 CREATE TABLE `suggestions` ( -- purchase suggestions Link Here
2177
   branchcode VARCHAR(10) default NULL, -- foreign key linking the suggested branch to the branches table
2177
   branchcode VARCHAR(10) default NULL, -- foreign key linking the suggested branch to the branches table
2178
   collectiontitle text default NULL, -- collection name for the suggested item
2178
   collectiontitle text default NULL, -- collection name for the suggested item
2179
   itemtype VARCHAR(30) default NULL, -- suggested item type 
2179
   itemtype VARCHAR(30) default NULL, -- suggested item type 
2180
	quantity SMALLINT(6) default NULL, -- suggested quantity to be purchased
2180
   quantity SMALLINT(6) default NULL, -- suggested quantity to be purchased
2181
	currency VARCHAR(3) default NULL, -- suggested currency for the suggested price
2181
   currency VARCHAR(3) default NULL, -- suggested currency for the suggested price
2182
	price DECIMAL(28,6) default NULL, -- suggested price
2182
   price DECIMAL(28,6) default NULL, -- suggested price
2183
	total DECIMAL(28,6) default NULL, -- suggested total cost (price*quantity updated for currency)
2183
   total DECIMAL(28,6) default NULL, -- suggested total cost (price*quantity updated for currency)
2184
  PRIMARY KEY  (`suggestionid`),
2184
  PRIMARY KEY  (`suggestionid`),
2185
  KEY `suggestedby` (`suggestedby`),
2185
  KEY `suggestedby` (`suggestedby`),
2186
  KEY `managedby` (`managedby`)
2186
  KEY `managedby` (`managedby`)
Lines 2478-2489 CREATE TABLE `permissions` ( Link Here
2478
2478
2479
DROP TABLE IF EXISTS `serialitems`;
2479
DROP TABLE IF EXISTS `serialitems`;
2480
CREATE TABLE `serialitems` (
2480
CREATE TABLE `serialitems` (
2481
	`itemnumber` int(11) NOT NULL,
2481
    `itemnumber` int(11) NOT NULL,
2482
	`serialid` int(11) NOT NULL,
2482
    `serialid` int(11) NOT NULL,
2483
	UNIQUE KEY `serialitemsidx` (`itemnumber`),
2483
    UNIQUE KEY `serialitemsidx` (`itemnumber`),
2484
	KEY `serialitems_sfk_1` (`serialid`),
2484
    KEY `serialitems_sfk_1` (`serialid`),
2485
	CONSTRAINT `serialitems_sfk_1` FOREIGN KEY (`serialid`) REFERENCES `serial` (`serialid`) ON DELETE CASCADE ON UPDATE CASCADE,
2485
    CONSTRAINT `serialitems_sfk_1` FOREIGN KEY (`serialid`) REFERENCES `serial` (`serialid`) ON DELETE CASCADE ON UPDATE CASCADE,
2486
	CONSTRAINT `serialitems_sfk_2` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE CASCADE ON UPDATE CASCADE
2486
    CONSTRAINT `serialitems_sfk_2` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE CASCADE ON UPDATE CASCADE
2487
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2487
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2488
2488
2489
--
2489
--
Lines 3464-3467 CREATE TABLE IF NOT EXISTS columns_settings ( Link Here
3464
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
3464
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
3465
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
3465
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
3466
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
3466
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
3467
(-)a/installer/data/mysql/updatedatabase.pl (-1 / +9 lines)
Lines 8800-8805 if ( CheckVersion($DBversion) ) { Link Here
8800
    SetVersion($DBversion);
8800
    SetVersion($DBversion);
8801
}
8801
}
8802
8802
8803
$DBversion = "XXX";
8804
if ( CheckVersion($DBversion) ) {
8805
    $dbh->do("ALTER TABLE  `items` CHANGE  `cn_sort`  `cn_sort` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL");
8806
    $dbh->do("ALTER TABLE  `deleteditems` CHANGE  `cn_sort`  `cn_sort` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL");
8807
    $dbh->do("ALTER TABLE  `biblioitems` CHANGE  `cn_sort`  `cn_sort` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL");
8808
    $dbh->do("ALTER TABLE  `deletedbiblioitems` CHANGE  `cn_sort`  `cn_sort` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL");
8809
    print "Upgrade to $DBversion done (Bug 12424 - ddc sorting of call numbers truncates long Cutter parts)\n";
8810
    SetVersion ($DBversion);
8811
}
8803
8812
8804
=head1 FUNCTIONS
8813
=head1 FUNCTIONS
8805
8814
8806
- 

Return to bug 12424