refactor: remove annotation handling from engine

This commit is contained in:
Deluan
2020-01-30 22:07:02 -05:00
committed by Deluan Quintão
parent 67ed830a68
commit 72d9ddf532
20 changed files with 151 additions and 386 deletions
+1 -10
View File
@@ -125,17 +125,8 @@ func (db *NewSQLStore) getOrmer() orm.Ormer {
}
func initORM(dbPath string) error {
//verbose := conf.Server.LogLevel == "trace"
//orm.Debug = verbose
if strings.Contains(dbPath, "postgres") {
driver = "postgres"
}
err := orm.RegisterDataBase("default", driver, dbPath)
if err != nil {
return err
}
// TODO Remove all RegisterModels (i.e. don't use orm.Insert/Update)
orm.RegisterModel(new(annotation))
return nil
return orm.RegisterDataBase("default", driver, dbPath)
}