Drop constraint quota_definitions_name_key #3952
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR waits for issue #3949, if support for Mysql5.7 will be stopped.-> MySQL 5.7 might be removed in Q1/Q2 2025. Adjusted this PR to support the old version.On the name column in quota_defintions there were two unique constraints/indexes. One unique index with name qd_name_index, which is similar in postgres and mysql, and then an unique constraint on column name with name in postgres=
quota_definitions_name_key
and name in mysql=name
. These index/constraint are created during table creation:The
unique: true
in lineString :name, null: false, unique: true, case_insensitive: true
creates the unique constraint.Since there is an unique index created on column name
index :name, unique: true
(later renamed to qd_name_index), we don't need the unique constraint. Dropping it with this migration.I have reviewed the contributing guide
I have viewed, signed, and submitted the Contributor License Agreement
I have made this pull request to the
main
branchI have run all the unit tests using
bundle exec rake
I have run CF Acceptance Tests