diff --git a/gems/houdini_upgrade/lib/generators/cw_to_activestorage/templates/migrate/rename_uploader_columns.rb b/gems/houdini_upgrade/lib/generators/cw_to_activestorage/templates/migrate/rename_uploader_columns.rb index 672aa8e1..6cd4ad3b 100644 --- a/gems/houdini_upgrade/lib/generators/cw_to_activestorage/templates/migrate/rename_uploader_columns.rb +++ b/gems/houdini_upgrade/lib/generators/cw_to_activestorage/templates/migrate/rename_uploader_columns.rb @@ -1,9 +1,11 @@ # License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later class RenameUploaderColumns < ActiveRecord::Migration[5.2] - require "houdini_upgrade" - HoudiniUpgrade::UPLOADERS_TO_MIGRATE.each do |table| - table.fields.each do |field| - rename_column table.name, field.name, field.migrated_name + def change + require "houdini_upgrade" + HoudiniUpgrade::UPLOADERS_TO_MIGRATE.each do |table| + table.fields.each do |field| + rename_column table.name, field.name, field.migrated_name + end end end end \ No newline at end of file