Cloud Migration: Remove ID migration in favor of UID (#86550)

* - Added migration to add a new collumn UID to both migration and migration_run tables.
- Added migration to set UID for records already existent in the database before adding a new column.
- Added UID field to CloudMigration and CloudMigrationRun dtos (model.go)

* Fix db migration

* Updating store and model

* Updating API to use UID

* fix typo

* update openapi specs and generated endpoints

* fix spec

* update openapi specs and generated endpoints

* Fixing db mapping

* Fix frontend

* fix migration

* remove migration uid from run fetch endpoint

* Revert "merge"

This reverts commit d654e4c530caebe439060c876c44132e74a28de8, reversing
changes made to 5fe0b483eb62cc9dfceb01043d2165617d974ed9.

* manual merge

* rename some funcs for consistency

* make interfaces consistent

* validate uids

* update generated frontend api

* fix enterprise spec

* manually resolve api

* try again

* try yet again

* once more

---------

Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>
Co-authored-by: Michael Mandrus <michael.mandrus@grafana.com>
Co-authored-by: joshhunt <josh@trtr.co>
This commit is contained in:
lean.dev
2024-05-01 13:29:25 -03:00
committed by GitHub
parent fcb40e601d
commit 0719f73f35
13 changed files with 316 additions and 315 deletions

View File

@ -9,13 +9,13 @@ type Service interface {
ValidateToken(context.Context, CloudMigration) error
CreateMigration(context.Context, CloudMigrationRequest) (*CloudMigrationResponse, error)
GetMigration(context.Context, int64) (*CloudMigration, error)
DeleteMigration(context.Context, int64) (*CloudMigration, error)
UpdateMigration(context.Context, int64, CloudMigrationRequest) (*CloudMigrationResponse, error)
GetMigration(ctx context.Context, uid string) (*CloudMigration, error)
DeleteMigration(ctx context.Context, uid string) (*CloudMigration, error)
UpdateMigration(ctx context.Context, uid string, request CloudMigrationRequest) (*CloudMigrationResponse, error)
GetMigrationList(context.Context) (*CloudMigrationListResponse, error)
RunMigration(context.Context, int64) (*MigrateDataResponseDTO, error)
SaveMigrationRun(context.Context, *CloudMigrationRun) (int64, error)
GetMigrationStatus(context.Context, string, string) (*CloudMigrationRun, error)
RunMigration(ctx context.Context, uid string) (*MigrateDataResponseDTO, error)
CreateMigrationRun(context.Context, CloudMigrationRun) (string, error)
GetMigrationStatus(ctx context.Context, runUID string) (*CloudMigrationRun, error)
GetMigrationRunList(context.Context, string) (*CloudMigrationRunList, error)
}