diff --git a/management/server/migration/migration.go b/management/server/migration/migration.go index 25539b893..5452fafdf 100644 --- a/management/server/migration/migration.go +++ b/management/server/migration/migration.go @@ -494,7 +494,6 @@ func MigrateJsonToTable[T any](ctx context.Context, db *gorm.DB, columnName stri func MigrateEmbeddedToTable[T any, S any, U any](ctx context.Context, db *gorm.DB, pkey string, mapperFunc func(obj S) *U) error { var model T - var u U log.WithContext(ctx).Debugf("Migrating embedded fields from %T to separate table", model) @@ -502,10 +501,6 @@ func MigrateEmbeddedToTable[T any, S any, U any](ctx context.Context, db *gorm.D log.WithContext(ctx).Debugf("table for %T does not exist, no migration needed", model) return nil } - if db.Migrator().HasTable(&u) { - log.WithContext(ctx).Debugf("table for %T already exists, no migration needed", u) - return nil - } stmt := &gorm.Statement{DB: db} err := stmt.Parse(&model)