Line 0
Link Here
|
|
|
1 |
$DBversion = 'XXX'; # will be replaced by the RM |
2 |
if( CheckVersion( $DBversion ) ) { |
3 |
unless ( column_exists( 'issuingrules', 'issuingrules_id' ) ) { |
4 |
$dbh->do(q|ALTER TABLE `issuingrules` DROP PRIMARY KEY|); |
5 |
$dbh->do(q|ALTER TABLE `issuingrules` ADD `issuingrules_id` INT( 11 ) NOT NULL auto_increment PRIMARY KEY FIRST|); |
6 |
$dbh->do(q|ALTER TABLE `issuingrules` ADD CONSTRAINT UNIQUE `issuingrules_id` (`branchcode`,`categorycode`,`itemtype`)|); |
7 |
} |
8 |
|
9 |
SetVersion( $DBversion ); |
10 |
print "Upgrade to $DBversion done (Bug 18231 - Add issuingrules.issuingrules_id)\n"; |
11 |
} |