Bug 19344

Summary: DB fields login_attempts and lang may be inverted
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: Architecture, internals, and plumbingAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Kyle M Hall <kyle>
Severity: normal    
Priority: P5 - low CC: fridolin.somers, katrin.fischer, kyle, mtompset
Version: unspecified   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 17762, 18314    
Bug Blocks:    
Attachments: Bug 19344: Reorder lang and login_attempts in the [deleted]borrowers tables
Bug 19344: Reorder lang and login_attempts in the [deleted]borrowers tables
Bug 19344: Reorder lang and login_attempts in the [deleted]borrowers tables

Description Jonathan Druart 2017-09-19 16:28:47 UTC
Due to a bad rebase, the borrowers and deletedborrowers table structure may different from a new install and upgraded install
Comment 1 Jonathan Druart 2017-09-19 16:35:09 UTC
Created attachment 67220 [details] [review]
Bug 19344: Reorder lang and login_attempts in the [deleted]borrowers tables

Due to a bad rebase, the borrowers and deletedborrowers table structure
may different from a new install and upgraded install
For new installs, the order was: lang, login_attempts
For upgraded installs, it was lang, last_seen, login_attempts

After this patch, the order must be:
- last_seen
- lang
- login_attempts
Comment 2 Mark Tompsett 2017-09-19 17:45:30 UTC
Went back to 16.05 did drop/create and reset_all.
checked the DB, didn't see the fields in question, though they may have been ordered differently then.
changed to master, ran upgrade.
different order confirmed.
applied patch
order corrected.
drop/create and reset_all
check the DB, fields are in the expected order (with overdrive_auth_token at the end).
Comment 3 Mark Tompsett 2017-09-19 17:46:31 UTC
Created attachment 67222 [details] [review]
Bug 19344: Reorder lang and login_attempts in the [deleted]borrowers tables

Due to a bad rebase, the borrowers and deletedborrowers table structure
may different from a new install and upgraded install
For new installs, the order was: lang, login_attempts
For upgraded installs, it was lang, last_seen, login_attempts

After this patch, the order must be:
- last_seen
- lang
- login_attempts

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Comment 4 Kyle M Hall 2017-09-29 14:04:29 UTC
Created attachment 67466 [details] [review]
Bug 19344: Reorder lang and login_attempts in the [deleted]borrowers tables

Due to a bad rebase, the borrowers and deletedborrowers table structure
may different from a new install and upgraded install
For new installs, the order was: lang, login_attempts
For upgraded installs, it was lang, last_seen, login_attempts

After this patch, the order must be:
- last_seen
- lang
- login_attempts

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 5 Jonathan Druart 2017-09-29 20:18:58 UTC
Pushed to master for 17.11, thanks to everybody involved!
Comment 6 Fridolin Somers 2017-10-27 12:13:53 UTC
Pushed to 17.05.x, will be in 17.05.06.
Comment 7 Katrin Fischer 2017-10-29 18:24:10 UTC
Both dependent bugs are not part of 16.11.x, so this should not be needed there. Closing.