From 260e5bab46f341f1faaf9f044ae53501871d1381 Mon Sep 17 00:00:00 2001 From: Andrew Zhao Date: Sun, 7 May 2017 20:40:00 -0700 Subject: [PATCH] auto migrate comments table --- db/gorm.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/gorm.go b/db/gorm.go index a2cd4617..eeb5226e 100644 --- a/db/gorm.go +++ b/db/gorm.go @@ -31,7 +31,7 @@ func GormInit(conf *config.Config) (*gorm.DB, error) { if config.Environment == "DEVELOPMENT" { db.LogMode(true) // db.DropTable(&model.User{}, "UserFollower") - db.AutoMigrate(&model.Torrents{}, &model.UsersFollowers{}, &model.User{}, &model.Role{}, &model.Language{}) + db.AutoMigrate(&model.Torrents{}, &model.UsersFollowers{}, &model.User{}, &model.Role{}, &model.Language{}, &model.Comment{}) // db.AutoMigrate(&model.Comment{}) // db.Model(&model.User{}).AddIndex("idx_user_token", "token")