From e19e60322b50b062bdf4cdb152cdf48157eee589 Mon Sep 17 00:00:00 2001 From: Eric Date: Mon, 4 May 2020 16:27:37 -0500 Subject: [PATCH] Move the tables and columns to migrate into a single place --- gems/houdini_upgrade/lib/houdini_upgrade.rb | 26 ++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/gems/houdini_upgrade/lib/houdini_upgrade.rb b/gems/houdini_upgrade/lib/houdini_upgrade.rb index 67a8181c..91160bed 100644 --- a/gems/houdini_upgrade/lib/houdini_upgrade.rb +++ b/gems/houdini_upgrade/lib/houdini_upgrade.rb @@ -4,5 +4,29 @@ require "houdini_upgrade/engine" module HoudiniUpgrade - # Your code goes here... + require 'houdini_upgrade/table_to_migrate' + UPLOADERS_TO_MIGRATE = [ + TableToMigrate.new(:nonprofits, [:main_image, + :second_image, + :third_image, + :background_image, + :logo]), + TableToMigrate.new(:campaigns, [ + :main_image, + :second_image, + :third_image, + :background_image, + :logo + ]), + TableToMigrate.new(:events, [ + :main_image, + :background_image + ]), + TableToMigrate.new(:image_attachments, [ + :file + ]), + TableToMigrate.new(:profiles, [ + :picture + ]) + ] end