Bug 34029: DBRev 22.11.07.003
[koha.git] / installer / data / mysql / db_revs / 221107003.pl
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` text DEFAULT NULL COMMENT 'publication place (MARC21 260$a and 264$a)'
12         });
13         say $out "Updated biblioitems.place to text";
14         $dbh->do(q{
15             ALTER TABLE `deletedbiblioitems`
16             MODIFY COLUMN `place` text DEFAULT NULL COMMENT 'publication place (MARC21 260$a and 264$a)'
17         });
18         say $out "Updated deletedbiblioitems.place to text";
19
20         $dbh->do(q{
21             ALTER TABLE `biblioitems`
22             MODIFY COLUMN `publishercode` text DEFAULT NULL COMMENT 'publisher (MARC21 260$b and 264$b)'
23         });
24         say $out "Updated biblioitems.publishercode to text";
25         $dbh->do(q{
26             ALTER TABLE `deletedbiblioitems`
27             MODIFY COLUMN `publishercode` text DEFAULT NULL COMMENT 'publisher (MARC21 260$b and 264$b)'
28         });
29         say $out "Updated deletedbiblioitems.publishercode to text";
30
31         $dbh->do(q{
32             ALTER TABLE `biblioitems`
33             MODIFY COLUMN `size` text DEFAULT NULL COMMENT 'material size (MARC21 300$c)'
34         });
35         say $out "Updated biblioitems.size to text";
36         $dbh->do(q{
37             ALTER TABLE `deletedbiblioitems`
38             MODIFY COLUMN `size` text DEFAULT NULL COMMENT 'material size (MARC21 300$c)'
39         });
40         say $out "Updated deletedbiblioitems.size to text";
41
42         $dbh->do(q{
43             ALTER TABLE `biblioitems`
44             MODIFY COLUMN `pages` text DEFAULT NULL COMMENT 'number of pages (MARC21 300$a)'
45         });
46         say $out "Updated biblioitems.pages to text";
47         $dbh->do(q{
48             ALTER TABLE `deletedbiblioitems`
49             MODIFY COLUMN `pages` text DEFAULT NULL COMMENT 'number of pages (MARC21 300$a)'
50         });
51         say $out "Updated deletedbiblioitems.pages to text";
52
53         $dbh->do(q{
54             ALTER TABLE `biblioitems`
55             MODIFY COLUMN `illus` text DEFAULT NULL COMMENT 'illustrations (MARC21 300$b)'
56         });
57         say $out "Updated biblioitems.illus to text";
58         $dbh->do(q{
59             ALTER TABLE `deletedbiblioitems`
60             MODIFY COLUMN `illus` text DEFAULT NULL COMMENT 'illustrations (MARC21 300$b)'
61         });
62         say $out "Updated deletedbiblioitems.illus to text";
63
64     },
65 };