Koha/installer/data/mysql/db_revs/230600039.pl
Tomas Cohen Arazi 01602b59d5
Bug 32721: DBRev 23.06.00.039
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-19 16:00:58 -03:00

33 lines
1 KiB
Perl
Executable file

use Modern::Perl;
return {
bug_number => "32721",
description => "Allow branch specific javascript and css to be injected into the OPAC depending on a branchcode",
up => sub {
my ($args) = @_;
my ( $dbh, $out ) = @$args{qw(dbh out)};
if ( !column_exists( 'branches', 'opacuserjs' ) ) {
$dbh->do(
q{
ALTER TABLE branches
ADD COLUMN `opacuserjs` longtext DEFAULT NULL COMMENT 'branch specific javascript for the OPAC'
AFTER `public`
}
);
say $out "Added column 'branches.opacuserjs'";
}
if ( !column_exists( 'branches', 'opacusercss' ) ) {
$dbh->do(
q{
ALTER TABLE branches
ADD COLUMN `opacusercss` longtext DEFAULT NULL COMMENT 'branch specific css for the OPAC'
AFTER `opacuserjs`
}
);
say $out "Added column 'branches.opacusercss'";
}
},
};