Bugzilla – Attachment 185650 Details for
Bug 38924
Introduce an organization level loan 'Quota' system for Koha
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38924: Add type and timestamp to usage table
Bug-38924-Add-type-and-timestamp-to-usage-table.patch (text/plain), 3.31 KB, created by
Victor Grousset/tuxayo
on 2025-08-21 17:25:43 UTC
(
hide
)
Description:
Bug 38924: Add type and timestamp to usage table
Filename:
MIME Type:
Creator:
Victor Grousset/tuxayo
Created:
2025-08-21 17:25:43 UTC
Size:
3.31 KB
patch
obsolete
>From 4effc96d5610e541935d55c918130f5b17dadf89 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Fri, 7 Feb 2025 11:20:21 +0000 >Subject: [PATCH] Bug 38924: Add type and timestamp to usage table > >This allows us to more easily audit what actions incremented the usage >and when. > >We will use this later in display >--- > installer/data/mysql/atomicupdate/bug_38924-patron_quotas.pl | 4 +++- > installer/data/mysql/kohastructure.sql | 3 +++ > 2 files changed, 6 insertions(+), 1 deletion(-) > >diff --git a/installer/data/mysql/atomicupdate/bug_38924-patron_quotas.pl b/installer/data/mysql/atomicupdate/bug_38924-patron_quotas.pl >index fb1091ed1d..b1b2d4e3e0 100755 >--- a/installer/data/mysql/atomicupdate/bug_38924-patron_quotas.pl >+++ b/installer/data/mysql/atomicupdate/bug_38924-patron_quotas.pl >@@ -45,10 +45,12 @@ return { > `patron_quota_id` int(11) NOT NULL COMMENT 'foreign key linking to patron_quota.id', > `issue_id` int(11) DEFAULT NULL COMMENT 'linking to issues.issue_id or old_issues.issue_id', > `patron_id` int(11) NOT NULL COMMENT 'foreign key linking to borrowers.borrowernumber', >+ `type` enum('ISSUE','RENEW') NOT NULL COMMENT 'The type of usage this is', >+ `creation_date` timestamp NOT NULL DEFAULT current_timestamp() COMMENT 'the timestamp for when a usage was recorded', > PRIMARY KEY (`id`), > KEY `patron_quota_usage_ibfk_1` (`patron_quota_id`), >- > KEY `patron_quota_usage_ibfk_2` (`patron_id`), >+ KEY `patron_quota_usage_issue_id` (`issue_id`), > CONSTRAINT `patron_quota_usage_ibfk_1` FOREIGN KEY (`patron_quota_id`) REFERENCES `patron_quota` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, > CONSTRAINT `patron_quota_usage_ibfk_2` FOREIGN KEY (`patron_id`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE > ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index a3df649079..2307e799be 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -6826,9 +6826,12 @@ CREATE TABLE `patron_quota_usage` ( > `patron_quota_id` int(11) NOT NULL COMMENT 'foreign key linking to patron_quota.id', > `issue_id` int(11) DEFAULT NULL COMMENT 'linking to issues.issue_id or old_issues.issue_id', > `patron_id` int(11) NOT NULL COMMENT 'foreign key linking to borrowers.borrowernumber', >+ `type` enum('ISSUE','RENEW') NOT NULL COMMENT 'The type of usage this is', >+ `creation_date` timestamp NOT NULL DEFAULT current_timestamp() COMMENT 'the timestamp for when a usage was recorded', > PRIMARY KEY (`id`), > KEY `patron_quota_usage_ibfk_1` (`patron_quota_id`), > KEY `patron_quota_usage_ibfk_2` (`patron_id`), >+ KEY `patron_quota_usage_issue_id` (`issue_id`), > CONSTRAINT `patron_quota_usage_ibfk_1` FOREIGN KEY (`patron_quota_id`) REFERENCES `patron_quota` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, > CONSTRAINT `patron_quota_usage_ibfk_2` FOREIGN KEY (`patron_id`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE > ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; >-- >2.50.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 38924
:
178582
|
178583
|
178584
|
178585
|
178586
|
178587
|
178588
|
178589
|
178590
|
178591
|
178592
|
178593
|
178594
|
178595
|
178596
|
178597
|
178598
|
178599
|
178600
|
178601
|
178602
|
178603
|
178604
|
178605
|
178606
|
178607
|
178608
|
185631
|
185632
|
185633
|
185634
|
185635
|
185636
|
185637
|
185638
|
185639
|
185640
|
185641
|
185642
|
185643
|
185644
|
185645
|
185646
|
185647
|
185648
|
185649
|
185650
|
185651
|
185652
|
185653
|
185654
|
185655
|
185656
|
185657
|
185675
|
185676
|
185677
|
185678
|
185679
|
185680
|
185681
|
185682
|
185683
|
185684
|
185685
|
185686
|
185687
|
185688
|
185689
|
185690
|
185691
|
185692
|
185693
|
185694
|
185695
|
185696
|
185697
|
185698
|
185699
|
185700
|
185701
|
185702