feat: add meta model and test

This commit is contained in:
Noah Hsu
2022-06-16 21:59:49 +08:00
parent ca13678105
commit 52575f6ad6
7 changed files with 185 additions and 9 deletions

View File

@ -10,7 +10,7 @@ var db gorm.DB
func Init(d *gorm.DB) {
db = *d
err := db.AutoMigrate(&model.Account{})
err := db.AutoMigrate(new(model.Account), new(model.User), new(model.Meta))
if err != nil {
log.Fatalf("failed migrate database: %s", err.Error())
}