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

(-)a/installer/data/mysql/atomicupdate/bug_34029_biblioitems.pl (+65 lines)
Line 0 Link Here
1
use Modern::Perl;
2
3
return {
4
    bug_number => "34029",
5
    description => "Extend datatypes in biblioitems and deletedbiblioitems tables to avoid import errors",
6
    up => sub {
7
        my ($args) = @_;
8
        my ($dbh, $out) = @$args{qw(dbh out)};
9
        $dbh->do(q{
10
            ALTER TABLE `biblioitems`
11
            MODIFY COLUMN `place` longtext DEFAULT NULL COMMENT 'publication place (MARC21 260$a and 264$a)'
12
        });
13
        say $out "Updated biblioitems.place to longtext";
14
        $dbh->do(q{
15
            ALTER TABLE `deletedbiblioitems`
16
            MODIFY COLUMN `place` longtext DEFAULT NULL COMMENT 'publication place (MARC21 260$a and 264$a)'
17
        });
18
        say $out "Updated deletedbiblioitems.place to longtext";
19
20
        $dbh->do(q{
21
            ALTER TABLE `biblioitems`
22
            MODIFY COLUMN `publishercode` longtext DEFAULT NULL COMMENT 'publisher (MARC21 260$b and 264$b)'
23
        });
24
        say $out "Updated biblioitems.publishercode to longtext";
25
        $dbh->do(q{
26
            ALTER TABLE `deletedbiblioitems`
27
            MODIFY COLUMN `publishercode` longtext DEFAULT NULL COMMENT 'publisher (MARC21 260$b and 264$b)'
28
        });
29
        say $out "Updated deletedbiblioitems.publishercode to longtext";
30
31
        $dbh->do(q{
32
            ALTER TABLE `biblioitems`
33
            MODIFY COLUMN `size` longtext DEFAULT NULL COMMENT 'material size (MARC21 300$c)'
34
        });
35
        say $out "Updated biblioitems.size to longtext";
36
        $dbh->do(q{
37
            ALTER TABLE `deletedbiblioitems`
38
            MODIFY COLUMN `size` longtext DEFAULT NULL COMMENT 'material size (MARC21 300$c)'
39
        });
40
        say $out "Updated deletedbiblioitems.size to longtext";
41
42
        $dbh->do(q{
43
            ALTER TABLE `biblioitems`
44
            MODIFY COLUMN `pages` longtext DEFAULT NULL COMMENT 'number of pages (MARC21 300$a)'
45
        });
46
        say $out "Updated biblioitems.pages to longtext";
47
        $dbh->do(q{
48
            ALTER TABLE `deletedbiblioitems`
49
            MODIFY COLUMN `pages` longtext DEFAULT NULL COMMENT 'number of pages (MARC21 300$a)'
50
        });
51
        say $out "Updated deletedbiblioitems.pages to longtext";
52
53
        $dbh->do(q{
54
            ALTER TABLE `biblioitems`
55
            MODIFY COLUMN `illus` longtext DEFAULT NULL COMMENT 'illustrations (MARC21 300$b)'
56
        });
57
        say $out "Updated biblioitems.illus to longtext";
58
        $dbh->do(q{
59
            ALTER TABLE `deletedbiblioitems`
60
            MODIFY COLUMN `illus` longtext DEFAULT NULL COMMENT 'illustrations (MARC21 300$b)'
61
        });
62
        say $out "Updated deletedbiblioitems.illus to longtext";
63
        
64
    },
65
};
(-)a/installer/data/mysql/kohastructure.sql (-11 / +10 lines)
Lines 1123-1129 CREATE TABLE `biblioitems` ( Link Here
1123
  `issn` longtext DEFAULT NULL COMMENT 'ISSN (MARC21 022$a)',
1123
  `issn` longtext DEFAULT NULL COMMENT 'ISSN (MARC21 022$a)',
1124
  `ean` longtext DEFAULT NULL,
1124
  `ean` longtext DEFAULT NULL,
1125
  `publicationyear` mediumtext DEFAULT NULL,
1125
  `publicationyear` mediumtext DEFAULT NULL,
1126
  `publishercode` varchar(255) DEFAULT NULL COMMENT 'publisher (MARC21 260$b)',
1126
  `publishercode` longtext DEFAULT NULL COMMENT 'publisher (MARC21 260$b and 246$b)',
1127
  `volumedate` date DEFAULT NULL,
1127
  `volumedate` date DEFAULT NULL,
1128
  `volumedesc` mediumtext DEFAULT NULL COMMENT 'volume information (MARC21 362$a)',
1128
  `volumedesc` mediumtext DEFAULT NULL COMMENT 'volume information (MARC21 362$a)',
1129
  `collectiontitle` longtext DEFAULT NULL,
1129
  `collectiontitle` longtext DEFAULT NULL,
Lines 1132-1142 CREATE TABLE `biblioitems` ( Link Here
1132
  `editionstatement` mediumtext DEFAULT NULL,
1132
  `editionstatement` mediumtext DEFAULT NULL,
1133
  `editionresponsibility` mediumtext DEFAULT NULL,
1133
  `editionresponsibility` mediumtext DEFAULT NULL,
1134
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
1134
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
1135
  `illus` varchar(255) DEFAULT NULL COMMENT 'illustrations (MARC21 300$b)',
1135
  `illus` longtext DEFAULT NULL COMMENT 'illustrations (MARC21 300$b)',
1136
  `pages` varchar(255) DEFAULT NULL COMMENT 'number of pages (MARC21 300$c)',
1136
  `pages` longtext DEFAULT NULL COMMENT 'number of pages (MARC21 300$a)',
1137
  `notes` longtext DEFAULT NULL,
1137
  `notes` longtext DEFAULT NULL,
1138
  `size` varchar(255) DEFAULT NULL COMMENT 'material size (MARC21 300$c)',
1138
  `size` longtext DEFAULT NULL COMMENT 'material size (MARC21 300$c)',
1139
  `place` varchar(255) DEFAULT NULL COMMENT 'publication place (MARC21 260$a)',
1139
  `place` longtext DEFAULT NULL COMMENT 'publication place (MARC21 260$a and 264$a)',
1140
  `lccn` longtext DEFAULT NULL COMMENT 'library of congress control number (MARC21 010$a)',
1140
  `lccn` longtext DEFAULT NULL COMMENT 'library of congress control number (MARC21 010$a)',
1141
  `url` mediumtext DEFAULT NULL COMMENT 'url (MARC21 856$u)',
1141
  `url` mediumtext DEFAULT NULL COMMENT 'url (MARC21 856$u)',
1142
  `cn_source` varchar(10) DEFAULT NULL COMMENT 'classification source (MARC21 942$2)',
1142
  `cn_source` varchar(10) DEFAULT NULL COMMENT 'classification source (MARC21 942$2)',
Lines 2526-2532 CREATE TABLE `deletedbiblioitems` ( Link Here
2526
  `issn` longtext DEFAULT NULL COMMENT 'ISSN (MARC21 022$a)',
2526
  `issn` longtext DEFAULT NULL COMMENT 'ISSN (MARC21 022$a)',
2527
  `ean` longtext DEFAULT NULL,
2527
  `ean` longtext DEFAULT NULL,
2528
  `publicationyear` mediumtext DEFAULT NULL,
2528
  `publicationyear` mediumtext DEFAULT NULL,
2529
  `publishercode` varchar(255) DEFAULT NULL COMMENT 'publisher (MARC21 260$b)',
2529
  `publishercode` longtext DEFAULT NULL COMMENT 'publisher (MARC21 260$b and 264$b)',
2530
  `volumedate` date DEFAULT NULL,
2530
  `volumedate` date DEFAULT NULL,
2531
  `volumedesc` mediumtext DEFAULT NULL COMMENT 'volume information (MARC21 362$a)',
2531
  `volumedesc` mediumtext DEFAULT NULL COMMENT 'volume information (MARC21 362$a)',
2532
  `collectiontitle` longtext DEFAULT NULL,
2532
  `collectiontitle` longtext DEFAULT NULL,
Lines 2535-2545 CREATE TABLE `deletedbiblioitems` ( Link Here
2535
  `editionstatement` mediumtext DEFAULT NULL,
2535
  `editionstatement` mediumtext DEFAULT NULL,
2536
  `editionresponsibility` mediumtext DEFAULT NULL,
2536
  `editionresponsibility` mediumtext DEFAULT NULL,
2537
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
2537
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
2538
  `illus` varchar(255) DEFAULT NULL COMMENT 'illustrations (MARC21 300$b)',
2538
  `illus` longtext DEFAULT NULL COMMENT 'illustrations (MARC21 300$b)',
2539
  `pages` varchar(255) DEFAULT NULL COMMENT 'number of pages (MARC21 300$c)',
2539
  `pages` longtext DEFAULT NULL COMMENT 'number of pages (MARC21 300$a)',
2540
  `notes` longtext DEFAULT NULL,
2540
  `notes` longtext DEFAULT NULL,
2541
  `size` varchar(255) DEFAULT NULL COMMENT 'material size (MARC21 300$c)',
2541
  `size` longtext DEFAULT NULL COMMENT 'material size (MARC21 300$c)',
2542
  `place` varchar(255) DEFAULT NULL COMMENT 'publication place (MARC21 260$a)',
2542
  `place` longtext DEFAULT NULL COMMENT 'publication place (MARC21 260$a and 264§a)',
2543
  `lccn` longtext DEFAULT NULL COMMENT 'library of congress control number (MARC21 010$a)',
2543
  `lccn` longtext DEFAULT NULL COMMENT 'library of congress control number (MARC21 010$a)',
2544
  `url` mediumtext DEFAULT NULL COMMENT 'url (MARC21 856$u)',
2544
  `url` mediumtext DEFAULT NULL COMMENT 'url (MARC21 856$u)',
2545
  `cn_source` varchar(10) DEFAULT NULL COMMENT 'classification source (MARC21 942$2)',
2545
  `cn_source` varchar(10) DEFAULT NULL COMMENT 'classification source (MARC21 942$2)',
2546
- 

Return to bug 34029