From 518c18f648eb797a087643f30dba1c1f26efdae1 Mon Sep 17 00:00:00 2001 From: takahashim Date: Sun, 17 Mar 2024 01:05:17 +0900 Subject: [PATCH] Fix a migration file --- .../20200912130614_fix_reference_for_all_resources.decidim.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/db/migrate/20200912130614_fix_reference_for_all_resources.decidim.rb b/db/migrate/20200912130614_fix_reference_for_all_resources.decidim.rb index 1bb08f7fdd..ad0dd85058 100644 --- a/db/migrate/20200912130614_fix_reference_for_all_resources.decidim.rb +++ b/db/migrate/20200912130614_fix_reference_for_all_resources.decidim.rb @@ -6,6 +6,8 @@ def up models = ActiveRecord::Base.descendants.select { |c| c.included_modules.include?(Decidim::HasReference) } models.each do |model| + next unless model.table_exists? + model.find_each(&:touch) end end