Koha/installer/data/mysql/atomicupdate/bug_20772-add-readonly-flag-to-illrequestattributes.perl
Andrew Isherwood 925f4ca1da Bug 20772: (follow-up) Fix DB updates and templates
Carry out changes requested in commenbt #27

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2018-10-13 08:34:33 -03:00

11 lines
477 B
Perl

$DBversion = 'XXX'; # will be replaced by the RM
if( CheckVersion( $DBversion ) ) {
if( !column_exists( 'illrequestattributes', 'readonly' ) ) {
$dbh->do( "ALTER TABLE illrequestattributes ADD COLUMN readonly tinyint(1) NOT NULL DEFAULT 1 AFTER 'value'" );
$dbh->do( "UPDATE illrequestattributes SET readonly = 1" );
}
SetVersion( $DBversion );
print "Upgrade to $DBversion done (Bug 20772 - Add illrequestattributes.readonly column)\n";
}