go-gorm / playground

GORM Playground (Please Create PR for this project to report issues)
MIT License
89 stars 681 forks source link

AutoMigrate to add primary key is not working #709

Open sgasho opened 6 months ago

sgasho commented 6 months ago

Explain your user case and expected results

DB

How To Reproduce

  1. AutoMigrate structA without primary key specification
  2. add primary key to some existing column in StructA then run AutoMigrate

Expected

Result