It was suggested by our DB admin to add this to make purging old records easier
Created attachment 175029 [details] [review] 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>
Created attachment 175036 [details] [review] 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>
Created attachment 175047 [details] [review] 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>
Is this a bug or an enh?
Pushed for 25.05! Well done everyone, thank you!