-
Notifications
You must be signed in to change notification settings - Fork 648
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
Creating PrimaryKeys constraint get different constraint names #1800
Comments
Obviously, the observed difference in the name of the primary key occurs due to the fact that, when creating primary key via creating a table, the I agree that it would be correct for the name for the primary key to be generated the same in all cases. I have created a pull request with the appropriate fix, please check #1803. I won’t reassure you and I’ll say right away that I’m not a maintainer. For now, I suggest keeping in mind that the default primary key name is not guaranteed. And each time explicitly set the name of the primary key. |
This would be a breaking change, but seems reasonable. For now you can implement a different naming convention as a workaround. |
Describe the bug
Creating PrimaryKeys constraint get different constraint names
To Reproduce
I have an initial migration for table creation
This will generate a constraint name "PK_MyTable", and in a later migration I have to re-create the primary key because of a table rename
This will generate a constraint name "PK_NewTableName_Id"
Is this intended or I had an issue.
Expected behavior
Same constraint name convention for example "PK_NewTableName" based on
DefaultPrimaryKeyNameConvention
Information:
The text was updated successfully, but these errors were encountered: