https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30912

--- Comment #5 from Nick Clemens <n...@bywatersolutions.com> ---
Created attachment 135880
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135880&action=edit
Bug 30912: [alternate] Drop primary key only if exists

To test:
1 - Have koha running with MySQL 8
2 - sudo koha-mysql kohadev
3 - To confirm current indexes:
    SHOW INDEXES FROM user_permissions WHERE Key_name = 'PRIMARY';
4 - Drop them to ensure the update will run
    ALTER TABLE user_permissions DROP INDEX `PRIMARY`;
5 - Run the DB update (using attached script) and ensure it works when there is
no key
6 - Drop the key again
   ALTER TABLE user_permissions DROP INDEX `PRIMARY`;
7 - Create new index that will still trigger update
   ALTER TABLE user_permissions ADD CONSTRAINT PK_borrowernumber_module_code
PRIMARY KEY (borrowernumber,module_bit);
8 - Run update again and ensure it works when there is a key

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/

Reply via email to