feefbb504f
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>
11 lines
463 B
Perl
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";
|
|
}
|