diff --git a/management/server/migration/migration.go b/management/server/migration/migration.go index 60c923352..a14c24eea 100644 --- a/management/server/migration/migration.go +++ b/management/server/migration/migration.go @@ -103,7 +103,6 @@ func MigrateFieldFromGobToJSON[T any, S any](db *gorm.DB, fieldName string) erro // MigrateNetIPFieldFromBlobToJSON migrates a Net IP column from Blob encoding to JSON encoding. // T is the type of the model that contains the field to be migrated. -// S is the type of the field to be migrated. func MigrateNetIPFieldFromBlobToJSON[T any](db *gorm.DB, fieldName string, indexName string) error { oldColumnName := fieldName newColumnName := fieldName + "_tmp" @@ -130,9 +129,6 @@ func MigrateNetIPFieldFromBlobToJSON[T any](db *gorm.DB, fieldName string, index } return fmt.Errorf("fetch first record: %w", err) } - if len(item) < 0 { - return fmt.Errorf("no records fetched") - } var js json.RawMessage var syntaxError *json.SyntaxError