|
Line 0
Link Here
|
|
|
1 |
$DBversion = 'XXX'; # will be replaced by the RM |
| 2 |
if( CheckVersion( $DBversion ) ) { |
| 3 |
$sth = $dbh->prepare("SELECT category_name FROM authorised_value_categories WHERE category_name='UPLOAD'"); |
| 4 |
$sth->execute; |
| 5 |
my ($value) = $sth->fetchrow; |
| 6 |
if( $value ){ |
| 7 |
print "The UPLOAD authorized value category exists. Update the 'is_system' value to 1.\n"; |
| 8 |
$dbh->do( "UPDATE authorised_value_categories SET is_system = 1 WHERE category_name = 'UPLOAD'" ); |
| 9 |
} else { |
| 10 |
print "The UPLOAD authorized value category does not exist. Create it.\n"; |
| 11 |
$dbh->do( "INSERT IGNORE INTO authorised_value_categories (category_name, is_system) VALUES ('UPLOAD', 1)" ); |
| 12 |
} |
| 13 |
|
| 14 |
# Always end with this (adjust the bug info) |
| 15 |
NewVersion( $DBversion, 27598, "Add UPLOAD as a built-in system authorized value category"); |
| 16 |
} |