|
Lines 3-14
if( CheckVersion( $DBversion ) ) {
Link Here
|
| 3 |
if ( column_exists( 'branch_borrower_circ_rules', 'maxissueqty' ) ) { |
3 |
if ( column_exists( 'branch_borrower_circ_rules', 'maxissueqty' ) ) { |
| 4 |
$dbh->do(" |
4 |
$dbh->do(" |
| 5 |
INSERT INTO circulation_rules ( categorycode, branchcode, itemtype, rule_name, rule_value ) |
5 |
INSERT INTO circulation_rules ( categorycode, branchcode, itemtype, rule_name, rule_value ) |
| 6 |
SELECT categorycode, branchcode, NULL, 'maxissueqty', maxissueqty |
6 |
SELECT categorycode, branchcode, NULL, 'patron_maxissueqty', maxissueqty |
| 7 |
FROM branch_borrower_circ_rules |
7 |
FROM branch_borrower_circ_rules |
| 8 |
"); |
8 |
"); |
| 9 |
$dbh->do(" |
9 |
$dbh->do(" |
| 10 |
INSERT INTO circulation_rules ( categorycode, branchcode, itemtype, rule_name, rule_value ) |
10 |
INSERT INTO circulation_rules ( categorycode, branchcode, itemtype, rule_name, rule_value ) |
| 11 |
SELECT categorycode, branchcode, NULL, 'maxonsiteissueqty', maxonsiteissueqty |
11 |
SELECT categorycode, branchcode, NULL, 'patron_maxonsiteissueqty', maxonsiteissueqty |
| 12 |
FROM branch_borrower_circ_rules |
12 |
FROM branch_borrower_circ_rules |
| 13 |
"); |
13 |
"); |
| 14 |
$dbh->do("DROP TABLE branch_borrower_circ_rules"); |
14 |
$dbh->do("DROP TABLE branch_borrower_circ_rules"); |
|
Lines 17-28
if( CheckVersion( $DBversion ) ) {
Link Here
|
| 17 |
if ( column_exists( 'default_borrower_circ_rules', 'maxissueqty' ) ) { |
17 |
if ( column_exists( 'default_borrower_circ_rules', 'maxissueqty' ) ) { |
| 18 |
$dbh->do(" |
18 |
$dbh->do(" |
| 19 |
INSERT INTO circulation_rules ( categorycode, branchcode, itemtype, rule_name, rule_value ) |
19 |
INSERT INTO circulation_rules ( categorycode, branchcode, itemtype, rule_name, rule_value ) |
| 20 |
SELECT categorycode, NULL, NULL, 'maxissueqty', maxissueqty |
20 |
SELECT categorycode, NULL, NULL, 'patron_maxissueqty', maxissueqty |
| 21 |
FROM default_borrower_circ_rules |
21 |
FROM default_borrower_circ_rules |
| 22 |
"); |
22 |
"); |
| 23 |
$dbh->do(" |
23 |
$dbh->do(" |
| 24 |
INSERT INTO circulation_rules ( categorycode, branchcode, itemtype, rule_name, rule_value ) |
24 |
INSERT INTO circulation_rules ( categorycode, branchcode, itemtype, rule_name, rule_value ) |
| 25 |
SELECT categorycode, NULL, NULL, 'maxonsiteissueqty', maxonsiteissueqty |
25 |
SELECT categorycode, NULL, NULL, 'patron_maxonsiteissueqty', maxonsiteissueqty |
| 26 |
FROM default_borrower_circ_rules |
26 |
FROM default_borrower_circ_rules |
| 27 |
"); |
27 |
"); |
| 28 |
$dbh->do("DROP TABLE default_borrower_circ_rules"); |
28 |
$dbh->do("DROP TABLE default_borrower_circ_rules"); |
|
Lines 31-42
if( CheckVersion( $DBversion ) ) {
Link Here
|
| 31 |
if ( column_exists( 'default_circ_rules', 'maxissueqty' ) ) { |
31 |
if ( column_exists( 'default_circ_rules', 'maxissueqty' ) ) { |
| 32 |
$dbh->do(" |
32 |
$dbh->do(" |
| 33 |
INSERT INTO circulation_rules ( categorycode, branchcode, itemtype, rule_name, rule_value ) |
33 |
INSERT INTO circulation_rules ( categorycode, branchcode, itemtype, rule_name, rule_value ) |
| 34 |
SELECT NULL, NULL, NULL, 'maxissueqty', maxissueqty |
34 |
SELECT NULL, NULL, NULL, 'patron_maxissueqty', maxissueqty |
| 35 |
FROM default_circ_rules |
35 |
FROM default_circ_rules |
| 36 |
"); |
36 |
"); |
| 37 |
$dbh->do(" |
37 |
$dbh->do(" |
| 38 |
INSERT INTO circulation_rules ( categorycode, branchcode, itemtype, rule_name, rule_value ) |
38 |
INSERT INTO circulation_rules ( categorycode, branchcode, itemtype, rule_name, rule_value ) |
| 39 |
SELECT NULL, NULL, NULL, 'maxonsiteissueqty', maxonsiteissueqty |
39 |
SELECT NULL, NULL, NULL, 'patron_maxonsiteissueqty', maxonsiteissueqty |
| 40 |
FROM default_circ_rules |
40 |
FROM default_circ_rules |
| 41 |
"); |
41 |
"); |
| 42 |
$dbh->do("ALTER TABLE default_circ_rules DROP COLUMN maxissueqty, DROP COLUMN maxonsiteissueqty"); |
42 |
$dbh->do("ALTER TABLE default_circ_rules DROP COLUMN maxissueqty, DROP COLUMN maxonsiteissueqty"); |
|
Lines 45-56
if( CheckVersion( $DBversion ) ) {
Link Here
|
| 45 |
if ( column_exists( 'default_branch_circ_rules', 'maxissueqty' ) ) { |
45 |
if ( column_exists( 'default_branch_circ_rules', 'maxissueqty' ) ) { |
| 46 |
$dbh->do(" |
46 |
$dbh->do(" |
| 47 |
INSERT INTO circulation_rules ( categorycode, branchcode, itemtype, rule_name, rule_value ) |
47 |
INSERT INTO circulation_rules ( categorycode, branchcode, itemtype, rule_name, rule_value ) |
| 48 |
SELECT NULL, branchcode, NULL, 'maxissueqty', maxissueqty |
48 |
SELECT NULL, branchcode, NULL, 'patron_maxissueqty', maxissueqty |
| 49 |
FROM default_branch_circ_rules |
49 |
FROM default_branch_circ_rules |
| 50 |
"); |
50 |
"); |
| 51 |
$dbh->do(" |
51 |
$dbh->do(" |
| 52 |
INSERT INTO circulation_rules ( categorycode, branchcode, itemtype, rule_name, rule_value ) |
52 |
INSERT INTO circulation_rules ( categorycode, branchcode, itemtype, rule_name, rule_value ) |
| 53 |
SELECT NULL, NULL, NULL, 'maxonsiteissueqty', maxonsiteissueqty |
53 |
SELECT NULL, NULL, NULL, 'patron_maxonsiteissueqty', maxonsiteissueqty |
| 54 |
FROM default_branch_circ_rules |
54 |
FROM default_branch_circ_rules |
| 55 |
"); |
55 |
"); |
| 56 |
$dbh->do("ALTER TABLE default_branch_circ_rules DROP COLUMN maxissueqty, DROP COLUMN maxonsiteissueqty"); |
56 |
$dbh->do("ALTER TABLE default_branch_circ_rules DROP COLUMN maxissueqty, DROP COLUMN maxonsiteissueqty"); |