Albirew/nyaa-pantsu
Archivé
1
0
Bifurcation 0

auto migrate comments table

Cette révision appartient à :
Andrew Zhao 2017-05-07 20:40:00 -07:00
Parent 15b1552f4e
révision 260e5bab46

Voir le fichier

@ -31,7 +31,7 @@ func GormInit(conf *config.Config) (*gorm.DB, error) {
if config.Environment == "DEVELOPMENT" { if config.Environment == "DEVELOPMENT" {
db.LogMode(true) db.LogMode(true)
// db.DropTable(&model.User{}, "UserFollower") // 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.AutoMigrate(&model.Comment{})
// db.Model(&model.User{}).AddIndex("idx_user_token", "token") // db.Model(&model.User{}).AddIndex("idx_user_token", "token")