浏览代码

Added missing common.go

Torkel Ödegaard 10 年之前
父节点
当前提交
16fd256225
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      pkg/services/sqlstore/migrations/common.go

+ 1 - 2
pkg/services/sqlstore/migrations/common.go

@@ -15,9 +15,8 @@ func addDropAllIndicesMigrations(mg *Migrator, versionSuffix string, table Table
 
 func addTableIndicesMigrations(mg *Migrator, versionSuffix string, table Table) {
 	for _, index := range table.Indices {
-		migration := NewAddIndexMigration(table, index)
 		migrationId := fmt.Sprintf("create index %s - %s", index.XName(table.Name), versionSuffix)
-		mg.AddMigration(migrationId, migration)
+		mg.AddMigration(migrationId, NewAddIndexMigration(table, index))
 	}
 }