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 primary key instead drop and create #213

Closed
jozef-slezak opened this issue Aug 12, 2022 · 1 comment
Closed

Rename primary key instead drop and create #213

jozef-slezak opened this issue Aug 12, 2022 · 1 comment

Comments

@jozef-slezak
Copy link

AS-IS: when we rename the primary key then drop & create statements are generated

expected behavior: rename the primary key / index / constraint if the type has not been changed

@djrobstep
Copy link
Owner

Thanks for filing this - I'm not sure if it's possible to fix this, however - it's not watertight to make assumptions about renaming based on the state of the constraints: Fundamentally it's impossible to tell the difference between a new and renamed column when only looking at the schema.

Adding configurability for renaming however is a possible future addition. In the short term, I'll create ticket for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants