Koha/installer/data/mysql
Tomas Cohen Arazi d3e6c3c709
Bug 30912: Fix db rev 21.12.00.016
This is a mix of Nick's patch and Jonathan's comment on it. I tested it
with KTD using MySQL 8 and it works correctly.

To test:
1. Launch KTD with bells and whistles:
   $ docker compose -f docker-compose.yml \
                    -f docker-compose.mysql8.0.yml \
                    up -d
2. Inside of it, do:
   $ koha-mysql kohadev
   > update systempreferences set value="21.1200015" where variable="version";
   > \q
   $ restart_all
   $ updatedatabase
=> SUCCESS: All good :-D
3. Run:
   $ koha-mysql kohadev
   > update systempreferences set value="21.1200015" where variable="version";
   > ALTER TABLE user_permissions DROP PRIMARY KEY;
   > \q
   $ updatedatabase
=> FAIL: You get:
Upgrade to 21.12.00.016  [12:47:09]: Bug 30060 - Update user_permissions to add primary key and remove null option from code column
ERROR - {UNKNOWN}: DBI Exception: DBD::mysql::db do failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF EXISTS `PRIMARY`' at line 1 at /kohadevbox/koha/C4/Installer.pm line 739
4. Apply this patch
5. Run:
   $ updatedatabase
=> SUCCESS: Update goes well
6. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-06-13 10:54:55 -03:00
..
atomicupdate Bug 30924: Add missing branchtransfers.reason value for recall cancellation 2022-06-13 10:30:51 -03:00
db_revs Bug 30912: Fix db rev 21.12.00.016 2022-06-13 10:54:55 -03:00
en Bug 30850: Add default mapping for biblio.author to 110$a (MARC21) 2022-06-08 11:23:09 -03:00
localization Bug 27619: Add custom for fr-FR 2022-05-11 09:59:58 +01:00
mandatory Bug 23659: (follow-up) Correct syspref.sql to match atomicupdate 2022-06-06 11:41:00 -03:00
backfill_statistics.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
fix_unclosed_nonaccruing_fines_bug17135.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
kohastructure.sql Bug 30924: Add missing branchtransfers.reason value for recall cancellation 2022-06-13 10:30:51 -03:00
labels_upgrade.pl Bug 21395: Make perlcritic happy 2020-06-29 12:37:02 +02:00
patroncards_upgrade.pl Bug 21395: Make perlcritic happy 2020-06-29 12:37:02 +02:00
update22to30.pl Bug 29180: (QA follow-up) Don't alter old DB up date 2021-11-05 12:13:25 +01:00
updatedatabase.pl Bug 30539: (bug 24161 follow-up) Fix typo in DBrev 2022-06-07 09:07:20 -03:00