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

When adding a new column to a table, include a primary key if the field is either a primary key itself or has an auto-increment attribute #129

Merged
merged 2 commits into from
Oct 10, 2023

Conversation

ckganesan
Copy link
Contributor

@ckganesan ckganesan commented Aug 1, 2023

  • Do only one thing
  • Non breaking API changes
  • Tested

What did this pull request do?

When adding a new column to a table, include a primary key if the field is either a primary key itself or has an auto-increment attribute

#6490

User Case Description

ALTER TABLE test ADD id bigint AUTO_INCREMENT, ADD PRIMARY KEY (id)

Ganesan Karuppasamy added 2 commits August 1, 2023 18:42
…ld is either a primary key itself or has an auto-increment attribute.
…ld is either a primary key itself or has an auto-increment attribute.
@ckganesan
Copy link
Contributor Author

@saeidee : Please look into this pull request

@ckganesan
Copy link
Contributor Author

@jinzhu: Could you kindly review and proceed with merging the pull request?

@jinzhu jinzhu merged commit 2a61ba0 into go-gorm:master Oct 10, 2023
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

Successfully merging this pull request may close these issues.

3 participants