Fix regular expression used for opclasses to not be confused by partial index clause
What does this MR do?
Fixes a bug in the schema dump which causes broken index definitions whenever a partial index is present.
For example in schema.rb on CE it results in this change:
- add_index "ci_builds", ["id"], name: "index_for_ci_builds_retried_migration", where: "(retried IS NULL)", using: :btree, opclasses: {"id)"=>"WHERE"}
+ add_index "ci_builds", ["id"], name: "index_for_ci_builds_retried_migration", where: "(retried IS NULL)", using: :btree
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary - Review
-
Has been reviewed by Database
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Squashed related commits together
Edited by yorickpeterse-staging