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

fix: create index failed without err #282

Merged
merged 1 commit into from
Sep 14, 2024

Conversation

zhangzhiqiangcs
Copy link
Contributor

@zhangzhiqiangcs zhangzhiqiangcs commented Aug 25, 2024

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

What did this pull request do?

Check index exists after create index. If not exists, return the err.

We run into this case, because we use the same index name for difference table, and the migration executed successfuly. But when use do some request, we got a err ERROR: there is no unique or exclusion constraint matching the ON CONFLICT specification (SQLSTATE 42P10 becase we must make sure the index exists.

@jinzhu jinzhu merged commit f300cc4 into go-gorm:master Sep 14, 2024
1 check passed
jinzhu added a commit that referenced this pull request Sep 14, 2024
jinzhu added a commit that referenced this pull request Sep 14, 2024
@jinzhu
Copy link
Member

jinzhu commented Sep 14, 2024

Can you add some tests? seems it always return an error currently

@zhangzhiqiangcs
Copy link
Contributor Author

@jinzhu sorry for making that mistake. Fixed this in #285

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.

2 participants