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 panic bug in migrator due to lack of nil check for stmt.Schema #6932

Merged
merged 1 commit into from
Apr 26, 2024

Conversation

pixelmaxQm
Copy link
Contributor

@pixelmaxQm pixelmaxQm commented Mar 29, 2024

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

What did this pull request do?

Fix panic bug in migrator due to lack of nil check for stmt.Schema

User Case Description

If a series of methods such as HasColumn use strings as table names, it will result in the inability to obtain stmt and cause painc. This modification can prevent painc and use the string passed in by the user as a specific name

@jinzhu jinzhu merged commit 7892019 into go-gorm:master Apr 26, 2024
33 of 36 checks passed
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