disable delete on migration

This commit is contained in:
Pascal Fischer
2025-07-03 12:51:55 +02:00
parent e23282b92c
commit 36155f8de1

View File

@@ -459,9 +459,10 @@ func MigrateJsonToTable[T any](ctx context.Context, db *gorm.DB, columnName stri
}
}
if err := tx.Migrator().DropColumn(&model, columnName); err != nil {
return fmt.Errorf("drop column %s: %w", columnName, err)
}
// Todo: Enable this after we are sure that every thing works as expected and we do not need to rollback anymore
// if err := tx.Migrator().DropColumn(&model, columnName); err != nil {
// return fmt.Errorf("drop column %s: %w", columnName, err)
// }
return nil
}); err != nil {