mirror of
https://github.com/muety/wakapi.git
synced 2023-08-10 21:12:56 +03:00
fix: auto increment in bigint migration
This commit is contained in:
parent
adcd7b35ae
commit
821ae94c1e
@ -17,10 +17,10 @@ func init() {
|
||||
|
||||
if cfg.Db.IsMySQL() {
|
||||
tx := db.Begin()
|
||||
if err := tx.Exec("ALTER TABLE heartbeats MODIFY COLUMN id BIGINT UNSIGNED").Error; err != nil {
|
||||
if err := tx.Exec("ALTER TABLE heartbeats MODIFY COLUMN id BIGINT UNSIGNED AUTO_INCREMENT").Error; err != nil {
|
||||
return err
|
||||
}
|
||||
if err := tx.Exec("ALTER TABLE summary_items MODIFY COLUMN id BIGINT UNSIGNED").Error; err != nil {
|
||||
if err := tx.Exec("ALTER TABLE summary_items MODIFY COLUMN id BIGINT UNSIGNED AUTO_INCREMENT").Error; err != nil {
|
||||
return err
|
||||
}
|
||||
tx.Commit()
|
||||
|
Loading…
Reference in New Issue
Block a user