Final work on migration, now there is no usage of xorm table sync

This commit is contained in:
Torkel Ödegaard
2015-01-20 14:44:37 +01:00
parent afb847acc8
commit 0a695ba17a
7 changed files with 37 additions and 6 deletions
+1 -5
View File
@@ -33,11 +33,6 @@ var (
UseSQLite3 bool
)
func init() {
tables = make([]interface{}, 0)
tables = append(tables, new(m.Token))
}
func EnsureAdminUser() {
adminQuery := m.GetUserByLoginQuery{LoginOrEmail: setting.AdminUser}
@@ -78,6 +73,7 @@ func SetEngine(engine *xorm.Engine, enableLog bool) (err error) {
dialect = migrator.NewDialect(x.DriverName())
migrator := migrator.NewMigrator(x)
migrator.LogLevel = log.INFO
addMigrations(migrator)
if err := migrator.Start(); err != nil {