-- MariaDB supports `IF NOT EXISTS` syntax when creating indexes. -- If an index already exists with the same name, it will not be duplicated. -- However, you should still review your pre-existing indexes in advance -- to make sure you do not already have one or more of the same indexes -- defined under a different name. If so, you should omit them -- from what you apply to your MariaDB database. ALTER ONLINE TABLE blc_cart_action_audit ADD INDEX IF NOT EXISTS IDX11w4lbb6dq08vd5cax3vwdxfp (cart_id) ALTER ONLINE TABLE blc_cart_action_audit ADD INDEX IF NOT EXISTS IDXq4k2t0jkcakobxti7xodu2wk3 (trk_application_context_id) ALTER ONLINE TABLE blc_cart_action_audit ADD INDEX IF NOT EXISTS IDXshjakfpir3s16ekiue6se3t2r (user_id) ALTER ONLINE TABLE blc_cart ADD INDEX IF NOT EXISTS IDX5lfxabd3jf78hwn9lxk8yo79o (account_id) ALTER ONLINE TABLE blc_cart ADD INDEX IF NOT EXISTS IDXf1tnxw2eyvqr2je7ayoqpddu4 (root_account_id)