You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
348 B

6 months ago
package data
import (
"bkb-payment/internal/data/model"
"gorm.io/gorm"
)
// AutoMigrate 数据库自动迁移
func autoMigrate(db *gorm.DB) error {
//db.SingularTable(true)
err := db.AutoMigrate(
model.Account{},
model.Bill{},
model.BillAttach{},
model.Country{},
model.District{},
)
if err != nil {
return err
}
return nil
}