View | Details | Raw Unified | Return to bug 38924
Collapse All | Expand All

(-)a/installer/data/mysql/atomicupdate/bug_38924-patron_quotas.pl (-2 / +4 lines)
Lines 45-54 return { Link Here
45
                  `patron_quota_id` int(11) NOT NULL COMMENT 'foreign key linking to patron_quota.id',
45
                  `patron_quota_id` int(11) NOT NULL COMMENT 'foreign key linking to patron_quota.id',
46
                  `issue_id` int(11) DEFAULT NULL COMMENT 'linking to issues.issue_id or old_issues.issue_id',
46
                  `issue_id` int(11) DEFAULT NULL COMMENT 'linking to issues.issue_id or old_issues.issue_id',
47
                  `patron_id` int(11) NOT NULL COMMENT 'foreign key linking to borrowers.borrowernumber',
47
                  `patron_id` int(11) NOT NULL COMMENT 'foreign key linking to borrowers.borrowernumber',
48
                  `type` enum('ISSUE','RENEW') NOT NULL COMMENT 'The type of usage this is',
49
                  `creation_date` timestamp NOT NULL DEFAULT current_timestamp() COMMENT 'the timestamp for when a usage was recorded',
48
                  PRIMARY KEY (`id`),
50
                  PRIMARY KEY (`id`),
49
                  KEY `patron_quota_usage_ibfk_1` (`patron_quota_id`),
51
                  KEY `patron_quota_usage_ibfk_1` (`patron_quota_id`),
50
51
                  KEY `patron_quota_usage_ibfk_2` (`patron_id`),
52
                  KEY `patron_quota_usage_ibfk_2` (`patron_id`),
53
                  KEY `patron_quota_usage_issue_id` (`issue_id`),
52
                  CONSTRAINT `patron_quota_usage_ibfk_1` FOREIGN KEY (`patron_quota_id`) REFERENCES `patron_quota` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
54
                  CONSTRAINT `patron_quota_usage_ibfk_1` FOREIGN KEY (`patron_quota_id`) REFERENCES `patron_quota` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
53
                  CONSTRAINT `patron_quota_usage_ibfk_2` FOREIGN KEY (`patron_id`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE
55
                  CONSTRAINT `patron_quota_usage_ibfk_2` FOREIGN KEY (`patron_id`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE
54
                ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
56
                ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
Lines 61-67 return { Link Here
61
63
62
        $dbh->do(q{
64
        $dbh->do(q{
63
            INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type)
65
            INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type)
64
            VALUES 
66
            VALUES
65
            ('AllowQuotaOverride', '0', NULL, 'Allow staff to override and check out items to patrons who have exceeded their quota limit', 'YesNo'),
67
            ('AllowQuotaOverride', '0', NULL, 'Allow staff to override and check out items to patrons who have exceeded their quota limit', 'YesNo'),
66
            ('UseGuarantorQuota', '0', NULL, 'Use guarantor quota instead of guarantee quota when checking out items', 'YesNo')
68
            ('UseGuarantorQuota', '0', NULL, 'Use guarantor quota instead of guarantee quota when checking out items', 'YesNo')
67
        });
69
        });
(-)a/installer/data/mysql/kohastructure.sql (-1 / +3 lines)
Lines 6822-6830 CREATE TABLE `patron_quota_usage` ( Link Here
6822
  `patron_quota_id` int(11) NOT NULL COMMENT 'foreign key linking to patron_quota.id',
6822
  `patron_quota_id` int(11) NOT NULL COMMENT 'foreign key linking to patron_quota.id',
6823
  `issue_id` int(11) DEFAULT NULL COMMENT 'linking to issues.issue_id or old_issues.issue_id',
6823
  `issue_id` int(11) DEFAULT NULL COMMENT 'linking to issues.issue_id or old_issues.issue_id',
6824
  `patron_id` int(11) NOT NULL COMMENT 'foreign key linking to borrowers.borrowernumber',
6824
  `patron_id` int(11) NOT NULL COMMENT 'foreign key linking to borrowers.borrowernumber',
6825
  `type` enum('ISSUE','RENEW') NOT NULL COMMENT 'The type of usage this is',
6826
  `creation_date` timestamp NOT NULL DEFAULT current_timestamp() COMMENT 'the timestamp for when a usage was recorded',
6825
  PRIMARY KEY (`id`),
6827
  PRIMARY KEY (`id`),
6826
  KEY `patron_quota_usage_ibfk_1` (`patron_quota_id`),
6828
  KEY `patron_quota_usage_ibfk_1` (`patron_quota_id`),
6827
  KEY `patron_quota_usage_ibfk_2` (`patron_id`),
6829
  KEY `patron_quota_usage_ibfk_2` (`patron_id`),
6830
  KEY `patron_quota_usage_issue_id` (`issue_id`),
6828
  CONSTRAINT `patron_quota_usage_ibfk_1` FOREIGN KEY (`patron_quota_id`) REFERENCES `patron_quota` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
6831
  CONSTRAINT `patron_quota_usage_ibfk_1` FOREIGN KEY (`patron_quota_id`) REFERENCES `patron_quota` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
6829
  CONSTRAINT `patron_quota_usage_ibfk_2` FOREIGN KEY (`patron_id`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE
6832
  CONSTRAINT `patron_quota_usage_ibfk_2` FOREIGN KEY (`patron_id`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE
6830
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;     
6833
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;     
6831
- 

Return to bug 38924