[v11.0.x] Cloudmigration: create migration (#86373)

Cloudmigration: create migration (#85386)

* Cloudmigration: create migration

* fix drone build

* lint fix

* fix unit test

---------

Co-authored-by: Michael Mandrus <michael.mandrus@grafana.com>
(cherry picked from commit 383ebb2bc4)

Co-authored-by: Leonard Gram <leo@xlson.com>
This commit is contained in:
grafana-delivery-bot[bot]
2024-04-16 17:05:09 +01:00
committed by GitHub
co-authored by Leonard Gram
parent 98401be295
commit f4539f7e9d
6 changed files with 56 additions and 18 deletions
@@ -29,4 +29,12 @@ func addCloudMigrationsMigrations(mg *Migrator) {
mg.AddMigration("create cloud_migration table v1", NewAddTableMigration(migrationTable))
mg.AddMigration("create cloud_migration_run table v1", NewAddTableMigration(migrationRunTable))
stackIDColumn := Column{Name: "stack_id", Type: DB_BigInt, Nullable: false}
regionSlugColumn := Column{Name: "region_slug", Type: DB_Text, Nullable: false}
clusterSlugColumn := Column{Name: "cluster_slug", Type: DB_Text, Nullable: false}
mg.AddMigration("add stack_id column", NewAddColumnMigration(migrationTable, &stackIDColumn))
mg.AddMigration("add region_slug column", NewAddColumnMigration(migrationTable, &regionSlugColumn))
mg.AddMigration("add cluster_slug column", NewAddColumnMigration(migrationTable, &clusterSlugColumn))
}