Put the rename uploader column into a change method
This commit is contained in:
parent
ed07c7ce3c
commit
98c78f6267
1 changed files with 6 additions and 4 deletions
|
@ -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
|
Loading…
Reference in a new issue