From 1c10ed0ec77ce81da11ea21be3c9bec67b2e25ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Sat, 26 Oct 2024 13:17:54 +0200 Subject: [PATCH] Remove legacy field in the visits table The search_keyword column was removed for new installations in Ahoy 2.1.0 and stopped being used completely in Ahoy 3.0.0. There are other columns that we use and are no longer generated by default by Ahoy, which are: screen_height, screen_width and postal_code. Apparently they're still used in Ahoy if they're available, though, so we aren't removing them, at least for now. --- .../20241026111636_remove_search_keyword_from_visits.rb | 5 +++++ db/schema.rb | 3 +-- 2 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 db/migrate/20241026111636_remove_search_keyword_from_visits.rb diff --git a/db/migrate/20241026111636_remove_search_keyword_from_visits.rb b/db/migrate/20241026111636_remove_search_keyword_from_visits.rb new file mode 100644 index 000000000..2910a3747 --- /dev/null +++ b/db/migrate/20241026111636_remove_search_keyword_from_visits.rb @@ -0,0 +1,5 @@ +class RemoveSearchKeywordFromVisits < ActiveRecord::Migration[7.0] + def change + remove_column :visits, :search_keyword, :string + end +end diff --git a/db/schema.rb b/db/schema.rb index d565cb35c..dc9ee1997 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema[7.0].define(version: 2024_05_13_135357) do +ActiveRecord::Schema[7.0].define(version: 2024_10_26_111636) do # These are extensions that must be enabled in order to support this database enable_extension "pg_trgm" enable_extension "plpgsql" @@ -1686,7 +1686,6 @@ ActiveRecord::Schema[7.0].define(version: 2024_05_13_135357) do t.text "landing_page" t.integer "user_id" t.string "referring_domain" - t.string "search_keyword" t.string "browser" t.string "os" t.string "device_type"