Lines 1-19
Link Here
|
1 |
use Modern::Perl; |
1 |
use Modern::Perl; |
2 |
|
2 |
|
3 |
return { |
3 |
return { |
4 |
bug_number => 29144, |
4 |
bug_number => 29144, |
5 |
description => "Copy and remove branches.opac_info", |
5 |
description => "Copy and remove branches.opac_info", |
6 |
up => sub { |
6 |
up => sub { |
7 |
my ($args) = @_; |
7 |
my ($args) = @_; |
8 |
my ($dbh, $out) = @$args{qw(dbh out)}; |
8 |
my ($dbh, $out) = @$args{qw(dbh out)}; |
9 |
$dbh->do(q{ |
9 |
|
10 |
INSERT IGNORE INTO additional_contents ( category,code,location,branchcode,title,content,lang,published_on ) |
10 |
if ( column_exists( 'branches', 'opac_info' ) ) { |
11 |
SELECT 'html_customizations', CONCAT('OpacLibraryInfo_', branches.branchcode), 'OpacLibraryInfo', branches.branchcode, branches.branchname, branches.opac_info, 'default', NOW() |
11 |
$dbh->do(q{ |
12 |
FROM branches |
12 |
INSERT IGNORE INTO additional_contents ( category,code,location,branchcode,title,content,lang,published_on ) |
13 |
WHERE branches.opac_info IS NOT NULL |
13 |
SELECT 'html_customizations', CONCAT('OpacLibraryInfo_', branches.branchcode), 'OpacLibraryInfo', branches.branchcode, branches.branchname, branches.opac_info, 'default', NOW() |
14 |
}); |
14 |
FROM branches |
15 |
$dbh->do(q{ |
15 |
WHERE branches.opac_info IS NOT NULL |
16 |
ALTER TABLE branches DROP COLUMN opac_info; |
16 |
}); |
17 |
}); |
17 |
|
|
|
18 |
$dbh->do(q{ |
19 |
ALTER TABLE branches DROP COLUMN opac_info; |
20 |
}); |
21 |
} |
18 |
}, |
22 |
}, |
19 |
}; |
23 |
}; |
20 |
- |
|
|