|
Lines 60-65
if( CheckVersion( $DBversion ) ) {
Link Here
|
| 60 |
$dbh->do("ALTER TABLE default_branch_circ_rules DROP COLUMN maxissueqty, DROP COLUMN maxonsiteissueqty"); |
60 |
$dbh->do("ALTER TABLE default_branch_circ_rules DROP COLUMN maxissueqty, DROP COLUMN maxonsiteissueqty"); |
| 61 |
} |
61 |
} |
| 62 |
|
62 |
|
|
|
63 |
if ( column_exists( 'issuingrules', 'maxissueqty' ) ) { |
| 64 |
$dbh->do(" |
| 65 |
INSERT INTO circulation_rules ( categorycode, branchcode, itemtype, rule_name, rule_value ) |
| 66 |
SELECT IF(categorycode='*', NULL, categorycode), |
| 67 |
IF(branchcode='*', NULL, branchcode), |
| 68 |
IF(itemtype='*', NULL, itemtype), |
| 69 |
'maxissueqty', |
| 70 |
COALESCE( maxissueqty, '' ) |
| 71 |
FROM issuingrules |
| 72 |
"); |
| 73 |
$dbh->do(" |
| 74 |
INSERT INTO circulation_rules ( categorycode, branchcode, itemtype, rule_name, rule_value ) |
| 75 |
SELECT IF(categorycode='*', NULL, categorycode), |
| 76 |
IF(branchcode='*', NULL, branchcode), |
| 77 |
IF(itemtype='*', NULL, itemtype), |
| 78 |
'maxonsiteissueqty', |
| 79 |
COALESCE( maxonsiteissueqty, '' ) |
| 80 |
FROM issuingrules |
| 81 |
"); |
| 82 |
$dbh->do("ALTER TABLE issuingrules DROP COLUMN maxissueqty, DROP COLUMN maxonsiteissueqty"); |
| 83 |
} |
| 84 |
|
| 63 |
SetVersion( $DBversion ); |
85 |
SetVersion( $DBversion ); |
| 64 |
print "Upgrade to $DBversion done (Bug 18925 - Move maxissueqty and maxonsiteissueqty to circulation_rules)\n"; |
86 |
print "Upgrade to $DBversion done (Bug 18925 - Move maxissueqty and maxonsiteissueqty to circulation_rules)\n"; |
| 65 |
} |
87 |
} |
| 66 |
- |
|
|