From fe55582879bbcddcbe71e1be200d5eed677874b3 Mon Sep 17 00:00:00 2001 From: Eric Pugh Date: Wed, 13 Sep 2023 10:47:57 -0400 Subject: [PATCH] once more --- .../20230816183004_create_search_endpoints_from_tries.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/db/migrate/20230816183004_create_search_endpoints_from_tries.rb b/db/migrate/20230816183004_create_search_endpoints_from_tries.rb index 60ed83ab5..aa872771c 100644 --- a/db/migrate/20230816183004_create_search_endpoints_from_tries.rb +++ b/db/migrate/20230816183004_create_search_endpoints_from_tries.rb @@ -3,10 +3,14 @@ def change # Discovered that there are tries that have null case's from 2016. We need to clean this up. + puts "Found #{Try.all.where(case_id: nil).count} bogus tries to destroy." + Try.all.where(case_id: nil) do |try| t.destroy! end + puts "Now, found #{Try.all.where(case_id: nil).count} bogus tries to destroy." + Try.all.each do |try|