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: AutoMigrate panic #97

Closed
wants to merge 1 commit into from

Conversation

a631807682
Copy link
Member

@a631807682 a631807682 commented Apr 7, 2022

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

What did this pull request do?

gorm test TestSmartMigrateColumn panic
I'm only testing in playground, I don't know how to test in postgres driver
I will explain the reason for this change in the review

#94
go-gorm/gorm#5175

User Case Description

@a631807682
Copy link
Member Author

I think we can revert from column = &migrator.columnType to column = migrator.columnType

jinzhu pushed a commit that referenced this pull request Apr 7, 2022
commit 17752a9d043b3638517227535d396d9462d85173
Author: Jinzhu <wosmvp@gmail.com>
Date:   Thu Apr 7 23:35:41 2022 +0800

    Refactor #97

commit 28f957e
Author: a631807682 <631807682@qq.com>
Date:   Thu Apr 7 18:03:19 2022 +0800

    fix: AutoMigrate panic
@jinzhu jinzhu closed this Apr 7, 2022
@jinzhu
Copy link
Member

jinzhu commented Apr 7, 2022

merged in commit 8e32323

@jinzhu
Copy link
Member

jinzhu commented Apr 7, 2022

I think we can revert from column = &migrator.columnType to column = migrator.columnType

both sounds good to me , I just want avoid reassign the value back... but I am good if you would like to create another pr to revert it back

@a631807682
Copy link
Member Author

I think we can revert from column = &migrator.columnType to column = migrator.columnType

both sounds good to me , I just want avoid reassign the value back... but I am good if you would like to create another pr to revert it back

It's my mistake, I thought the interface slice would store the value, but it actually stores the address

@a631807682 a631807682 deleted the fix_autoMigrate_panic branch April 7, 2022 15:52
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.

None yet

2 participants