Dashboard V0->V1 Migration: Schema migration v36 (#100757)

---------

Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>
Co-authored-by: Haris Rozajac <haris.rozajac12@gmail.com>
Co-authored-by: Stephanie Hingtgen <stephanie.hingtgen@grafana.com>
This commit is contained in:
Ivan Ortega Alba
2025-06-16 15:53:41 +02:00
committed by GitHub
co-authored by Todd Treece Haris Rozajac Stephanie Hingtgen
parent 6767adb4a6
commit 59c2f15433
17 changed files with 2977 additions and 15 deletions
@@ -0,0 +1,31 @@
package testutil
import "github.com/grafana/grafana/apps/dashboard/pkg/migration/schemaversion"
type TestDataSourceProvider struct{}
func (m *TestDataSourceProvider) GetDataSourceInfo() []schemaversion.DataSourceInfo {
return []schemaversion.DataSourceInfo{
{
Default: true,
UID: "default-ds",
Type: "prometheus",
APIVersion: "v1",
Name: "Default",
ID: 1,
},
{
Default: false,
UID: "other-ds",
Type: "elasticsearch",
APIVersion: "v2",
Name: "Elasticsearch",
ID: 2,
},
}
}
// GetTestProvider returns a singleton instance of the test provider
func GetTestProvider() *TestDataSourceProvider {
return &TestDataSourceProvider{}
}