I've using gorm.DB AutoMigrate:
err := db.AutoMigrate(&mysql.EventPO{}, &mysql.Transaction{}, &mysql.ServicePO{}, &lock.ResourceLock{}, &dtimer.TimerJob{})
But newer gorm version v1.25.12 have AutoMigrate bug: AutoMigrate will error at second run
Error 1091 (42000): Can't DROP 'uni_ddd_timer_key'; check that column/key exists`
I've using gorm.DB AutoMigrate:
But newer gorm version v1.25.12 have AutoMigrate bug: AutoMigrate will error at second run