1.7 db upgrade fails with syntax error for MariaDB: does not use VISIBLE on ALTER INDEX
Upgrading from Better Message Templates 1.6 to 1.7. CiviCRM 5.68.0
On MariaDB 10.6.3, ALTER INDEX … VISIBLE
causes a syntax error during the database upgrade process, from this line:
https://lab.civicrm.org/extensions/btrmsgtpl/-/blob/ac207a3eb41281202b3850bc8dc8843a3a2ec81d/CRM/Btrmsgtpl/Upgrader.php#L33
2023-12-24 22:07:13-0800 [info] btrmsgtpl: adding language support for system workflow message templates revisions.
2023-12-24 22:07:13-0800 [info] $CRM_Queue_Page_AJAX_runNext_error = Civi\Core\Exception\DBQueryException: "DB Error: syntax error"
* ERROR TYPE: DB_Error
* ERROR CODE: -2
* ERROR MESSAGE: DB Error: syntax error
* ERROR MODE: 16
* ERROR USERINFO: ALTER TABLE `civicrm_msg_template_revisions`
ALTER INDEX `msg_template_id` VISIBLE
[nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'VISIBLE' at line 2]
Changing the VISIBLE
keyword to NOT IGNORED
should make it work for MariaDB per the Ignored Indexes documentation.
Edited by composerjk