grafana/pkg/services/sqlstore/migrations/live_mig.go
Arve Knudsen 78596a6756
Migrate to Wire for dependency injection (#32289)
Fixes #30144

Co-authored-by: dsotirakis <sotirakis.dim@gmail.com>
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
Co-authored-by: Ida Furjesova <ida.furjesova@grafana.com>
Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
Co-authored-by: spinillos <selenepinillos@gmail.com>
Co-authored-by: Karl Persson <kalle.persson@grafana.com>
Co-authored-by: Leonard Gram <leo@xlson.com>
2021-08-25 15:11:22 +02:00

25 lines
1.1 KiB
Go

package migrations
import "github.com/grafana/grafana/pkg/services/sqlstore/migrator"
// For now disable migration. For now we are using local cache as storage to evaluate ideas.
// This will be turned on soon though.
func addLiveChannelMigrations(mg *migrator.Migrator) {
//liveMessage := migrator.Table{
// Name: "live_message",
// Columns: []*migrator.Column{
// {Name: "id", Type: migrator.DB_BigInt, Nullable: false, IsPrimaryKey: true, IsAutoIncrement: true},
// {Name: "org_id", Type: migrator.DB_BigInt, Nullable: false},
// {Name: "channel", Type: migrator.DB_NVarchar, Length: 189, Nullable: false},
// {Name: "data", Type: migrator.DB_Text, Nullable: false},
// {Name: "published", Type: migrator.DB_DateTime, Nullable: false},
// },
// Indices: []*migrator.Index{
// {Cols: []string{"org_id", "channel"}, Type: migrator.UniqueIndex},
// },
//}
//
//mg.AddMigration("create live message table", migrator.NewAddTableMigration(liveMessage))
//mg.AddMigration("add index live_message.org_id_channel_unique", migrator.NewAddIndexMigration(liveMessage, liveMessage.Indices[0]))
}