https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40725
Tomás Cohen Arazi (tcohen) <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #185856|0 |1 is obsolete| | --- Comment #3 from Tomás Cohen Arazi (tcohen) <[email protected]> --- Created attachment 185857 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=185857&action=edit Bug 40725: Add TableExists check to db_revs/231200053.pl This patch makes the DB revision idempotent. To test: 1. Fix the Koha version right before the broken upgrade: $ ktd --shell k$ koha-mysql kohadev > UPDATE systempreferences SET value="23.1200052" WHERE variable="version"; \q 2. Restart everything (memcached should be enough) k$ restart_all 3. Run: k$ updatedatabase => FAIL: You get: ```shell Upgrade to 23.12.00.053 [19:34:35]: Bug 36755 - Increase length of 'code' column in borrower_attribute_types ERROR: C4::Installer::foreign_key_exists(): DBI Exception: DBD::mysql::db selectrow_array failed: Table 'koha_kohadev.pseudonymized_borrower_attributes' doesn't exist at /kohadevbox/koha/installer/data/mysql/db_revs/231200053.pl line 11 ``` 4. Apply this patch 5. Repeat 3 => SUCCESS: Update runs smoothly! 6. Sign off :-D Signed-off-by: Tomas Cohen Arazi <[email protected]> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
