Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename back unique keys to unique constraints #49383

Merged
merged 1 commit into from Sep 26, 2023

Conversation

kamipo
Copy link
Member

@kamipo kamipo commented Sep 26, 2023

As we (I and @yahonda) talked about the naming in person, naming unique constraints as unique keys is very confusing to me. All documents and descriptions says it's unique constraints, but naming unique keys leads to misunderstanding it's a short-hand of unique indexes.
Just naming it unique constraints is not misleading.

cc @yahonda @alpaca-tc since unique keys is proposed at #46192

Copy link
Member

@yahonda yahonda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After thinking about this name for a while, now I agree with this change.

@yahonda
Copy link
Member

yahonda commented Sep 26, 2023

Some nitpick comment. How about git mv activerecord/test/cases/migration/unique_key_test.rb activerecord/test/cases/migration/unique_constraint_test.rb ?

As we (I and @yahonda) talked about the naming in person, naming unique
constraints as unique keys is very confusing to me.
All documents and descriptions says it's unique constraints, but naming
unique keys leads to misunderstanding it's a short-hand of unique
indexes.
Just naming it unique constraints is not misleading.
@kamipo
Copy link
Member Author

kamipo commented Sep 26, 2023

Good catch, renamed.

@kamipo kamipo merged commit 708176e into rails:main Sep 26, 2023
4 checks passed
@kamipo kamipo deleted the rename_unique_constraint branch September 26, 2023 09:35
kamipo added a commit to kamipo/rails that referenced this pull request Sep 26, 2023
And restore updating old ones in the CHANGELOG.
kamipo added a commit that referenced this pull request Sep 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants