]> 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)
committerKatrin Fischer <katrin.fischer@bsz-bw.de>
Tue, 3 Dec 2024 16:34:03 +0000 (17:34 +0100)
commit2e63ece6ae9d560302408a4303df882a47791c87
tree19cf8ed0da22fdf895720cecd09a5cf0cae8b627
parenta42686d8910594d674e7bbb8d163351306d3fbb5
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>
installer/data/mysql/atomicupdate/bug_37292.pl [new file with mode: 0755]
installer/data/mysql/kohastructure.sql