Cloud migrations: store resource name in the cloud_migration_resource table (#93612)

* Cloud migrations: store resource name in the cloud_migration_resource table

* remove unused function: convertMigrateDataResponseToDTO

* make swagger-clean && make openapi3-gen

* use DB_Text for cloud_migration_resource.name instead of DB_Varchar
This commit is contained in:
Bruno
2024-09-26 11:16:52 -03:00
committed by GitHub
parent 2e559bb333
commit 1b7cd4c684
8 changed files with 22 additions and 1 deletions
@@ -212,13 +212,14 @@ func (s *Service) buildSnapshot(ctx context.Context, signedInUser *user.SignedIn
resourcesGroupedByType := make(map[cloudmigration.MigrateDataType][]snapshot.MigrateDataRequestItemDTO, 0)
for i, item := range migrationData.Items {
resourcesGroupedByType[item.Type] = append(resourcesGroupedByType[item.Type], snapshot.MigrateDataRequestItemDTO{
Name: item.Name,
Type: snapshot.MigrateDataType(item.Type),
RefID: item.RefID,
Name: item.Name,
Data: item.Data,
})
localSnapshotResource[i] = cloudmigration.CloudMigrationResource{
Name: item.Name,
Type: item.Type,
RefID: item.RefID,
Status: cloudmigration.ItemStatusPending,