mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: Fix SQL related Go variable naming (#28887)
* Chore: Fix variable naming Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
This commit is contained in:
@@ -85,8 +85,8 @@ func addAnnotationMig(mg *Migrator) {
|
||||
//
|
||||
// clear alert text
|
||||
//
|
||||
updateTextFieldSql := "UPDATE annotation SET TEXT = '' WHERE alert_id > 0"
|
||||
mg.AddMigration("Update alert annotations and set TEXT to empty", NewRawSqlMigration(updateTextFieldSql))
|
||||
updateTextFieldSQL := "UPDATE annotation SET TEXT = '' WHERE alert_id > 0"
|
||||
mg.AddMigration("Update alert annotations and set TEXT to empty", NewRawSQLMigration(updateTextFieldSQL))
|
||||
|
||||
//
|
||||
// Add a 'created' & 'updated' column
|
||||
@@ -107,8 +107,8 @@ func addAnnotationMig(mg *Migrator) {
|
||||
//
|
||||
// Convert epoch saved as seconds to milliseconds
|
||||
//
|
||||
updateEpochSql := "UPDATE annotation SET epoch = (epoch*1000) where epoch < 9999999999"
|
||||
mg.AddMigration("Convert existing annotations from seconds to milliseconds", NewRawSqlMigration(updateEpochSql))
|
||||
updateEpochSQL := "UPDATE annotation SET epoch = (epoch*1000) where epoch < 9999999999"
|
||||
mg.AddMigration("Convert existing annotations from seconds to milliseconds", NewRawSQLMigration(updateEpochSQL))
|
||||
|
||||
//
|
||||
// 6.4: Make Regions a single annotation row
|
||||
@@ -119,7 +119,7 @@ func addAnnotationMig(mg *Migrator) {
|
||||
mg.AddMigration("Add index for epoch_end", NewAddIndexMigration(table, &Index{
|
||||
Cols: []string{"org_id", "epoch", "epoch_end"}, Type: IndexType,
|
||||
}))
|
||||
mg.AddMigration("Make epoch_end the same as epoch", NewRawSqlMigration("UPDATE annotation SET epoch_end = epoch"))
|
||||
mg.AddMigration("Make epoch_end the same as epoch", NewRawSQLMigration("UPDATE annotation SET epoch_end = epoch"))
|
||||
mg.AddMigration("Move region to single row", &AddMakeRegionSingleRowMigration{})
|
||||
|
||||
//
|
||||
@@ -154,7 +154,7 @@ type AddMakeRegionSingleRowMigration struct {
|
||||
MigrationBase
|
||||
}
|
||||
|
||||
func (m *AddMakeRegionSingleRowMigration) Sql(dialect Dialect) string {
|
||||
func (m *AddMakeRegionSingleRowMigration) SQL(dialect Dialect) string {
|
||||
return "code migration"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user