]> git.koha-community.org Git - koha.git/commit
Bug 37292: Add an index on oauth_access_tokens.expires
authorTomas Cohen Arazi <tomascohen@theke.io>
Fri, 29 Nov 2024 15:08:18 +0000 (12:08 -0300)
committerwainuiwitikapark <wainuiwitikapark@catalyst.net.nz>
Tue, 17 Dec 2024 22:42:28 +0000 (22:42 +0000)
commit066b0a3355c371e24756c32f5cccc2e8741256ae
tree1ae2bbbbea0497c856f16592e02ac63779a689ea
parentce8bb9def8890eec4eb422e7c2c07e70e1b45812
Bug 37292: Add an index on oauth_access_tokens.expires

This patch adds a needed index to the column.

To test:
1. On a fresh KTD, run:
   $ ktd --shell
  k$ koha-mysql kohadev
   > SHOW CREATE TABLE oauth_access_tokens;
=> FAIL: There's no 'KEY' entry for the `expires` column
2. Apply this patch
3. Run:
  k$ updatedatabase
=> SUCCESS: A message tells the index was added
4. Repeat 1
=> SUCCESS: The index was actually added to the DB
5. Run:
  k$ reset_all
6. Repeat 1
=> SUCCESS: The index is created at install time too!
7. Run:
  k$ updatedatabase
=> SUCCESS: Nothing explodes, no message about index being created
8. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 2e63ece6ae9d560302408a4303df882a47791c87)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: wainuiwitikapark <wainuiwitikapark@catalyst.net.nz>
installer/data/mysql/atomicupdate/bug_37292.pl [new file with mode: 0755]
installer/data/mysql/kohastructure.sql