浏览代码

migration: renames logging ds to loki ds in data_source table

Daniel Lee 7 年之前
父节点
当前提交
90e2175716
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      pkg/services/sqlstore/migrations/datasource_mig.go

+ 3 - 0
pkg/services/sqlstore/migrations/datasource_mig.go

@@ -127,4 +127,7 @@ func addDataSourceMigration(mg *Migrator) {
 	mg.AddMigration("Add read_only data column", NewAddColumnMigration(tableV2, &Column{
 		Name: "read_only", Type: DB_Bool, Nullable: true,
 	}))
+
+	const migrateLoggingToLoki = `UPDATE data_source SET type = 'loki' WHERE type = 'logging'`
+	mg.AddMigration("Migrate logging ds to loki ds", NewRawSqlMigration(migrateLoggingToLoki))
 }