Koha/installer/data/mysql/atomicupdate/bug_20772-add-readonly-flag-to-illrequestattributes.perl
Andrew Isherwood feefbb504f Bug 20772: Add 'illrequestattributes.readonly'
This patch adds a 'readonly' column to illrequestattributes. On a DB
upgrade it also populates all existing rows with 1, indicating 'read
only'

Signed-off-by: Barry Cannon <bc@interleaf.ie>

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

11 lines
463 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" );
$dbh->do( "UPDATE illrequestattributes SET readonly = 1" );
}
SetVersion( $DBversion );
print "Upgrade to $DBversion done (Bug 20772 - Add illrequestattributes.readonly column)\n";
}