Lines 1-31
Link Here
|
1 |
$DBversion = 'XXX'; # will be replaced by the RM |
1 |
$DBversion = 'XXX'; # will be replaced by the RM |
2 |
if( CheckVersion( $DBversion ) ) { |
2 |
if( CheckVersion( $DBversion ) ) { |
3 |
if ( column_exists( 'branch_borrower_circ_rules', 'maxissueqty' ) ) { |
3 |
if ( TableExists( 'branch_borrower_circ_rules' ) ) { |
4 |
$dbh->do(" |
4 |
if ( column_exists( 'branch_borrower_circ_rules', 'maxissueqty' ) ) { |
5 |
INSERT INTO circulation_rules ( categorycode, branchcode, itemtype, rule_name, rule_value ) |
5 |
$dbh->do(" |
6 |
SELECT categorycode, branchcode, NULL, 'patron_maxissueqty', COALESCE( maxissueqty, '' ) |
6 |
INSERT INTO circulation_rules ( categorycode, branchcode, itemtype, rule_name, rule_value ) |
7 |
FROM branch_borrower_circ_rules |
7 |
SELECT categorycode, branchcode, NULL, 'patron_maxissueqty', COALESCE( maxissueqty, '' ) |
8 |
"); |
8 |
FROM branch_borrower_circ_rules |
9 |
$dbh->do(" |
9 |
"); |
10 |
INSERT INTO circulation_rules ( categorycode, branchcode, itemtype, rule_name, rule_value ) |
10 |
$dbh->do(" |
11 |
SELECT categorycode, branchcode, NULL, 'patron_maxonsiteissueqty', COALESCE( maxonsiteissueqty, '' ) |
11 |
INSERT INTO circulation_rules ( categorycode, branchcode, itemtype, rule_name, rule_value ) |
12 |
FROM branch_borrower_circ_rules |
12 |
SELECT categorycode, branchcode, NULL, 'patron_maxonsiteissueqty', COALESCE( maxonsiteissueqty, '' ) |
13 |
"); |
13 |
FROM branch_borrower_circ_rules |
14 |
$dbh->do("DROP TABLE branch_borrower_circ_rules"); |
14 |
"); |
|
|
15 |
$dbh->do("DROP TABLE branch_borrower_circ_rules"); |
16 |
} |
15 |
} |
17 |
} |
16 |
|
18 |
|
17 |
if ( column_exists( 'default_borrower_circ_rules', 'maxissueqty' ) ) { |
19 |
if ( TableExists( 'default_borrower_circ_rules' ) ) { |
18 |
$dbh->do(" |
20 |
if ( column_exists( 'default_borrower_circ_rules', 'maxissueqty' ) ) { |
19 |
INSERT INTO circulation_rules ( categorycode, branchcode, itemtype, rule_name, rule_value ) |
21 |
$dbh->do(" |
20 |
SELECT categorycode, NULL, NULL, 'patron_maxissueqty', COALESCE( maxissueqty, '' ) |
22 |
INSERT INTO circulation_rules ( categorycode, branchcode, itemtype, rule_name, rule_value ) |
21 |
FROM default_borrower_circ_rules |
23 |
SELECT categorycode, NULL, NULL, 'patron_maxissueqty', COALESCE( maxissueqty, '' ) |
22 |
"); |
24 |
FROM default_borrower_circ_rules |
23 |
$dbh->do(" |
25 |
"); |
24 |
INSERT INTO circulation_rules ( categorycode, branchcode, itemtype, rule_name, rule_value ) |
26 |
$dbh->do(" |
25 |
SELECT categorycode, NULL, NULL, 'patron_maxonsiteissueqty', COALESCE( maxonsiteissueqty, '' ) |
27 |
INSERT INTO circulation_rules ( categorycode, branchcode, itemtype, rule_name, rule_value ) |
26 |
FROM default_borrower_circ_rules |
28 |
SELECT categorycode, NULL, NULL, 'patron_maxonsiteissueqty', COALESCE( maxonsiteissueqty, '' ) |
27 |
"); |
29 |
FROM default_borrower_circ_rules |
28 |
$dbh->do("DROP TABLE default_borrower_circ_rules"); |
30 |
"); |
|
|
31 |
$dbh->do("DROP TABLE default_borrower_circ_rules"); |
32 |
} |
29 |
} |
33 |
} |
30 |
|
34 |
|
31 |
if ( column_exists( 'default_circ_rules', 'maxissueqty' ) ) { |
35 |
if ( column_exists( 'default_circ_rules', 'maxissueqty' ) ) { |
32 |
- |
|
|