Remove visit_id from the debates table

This was added in commit 02f19aa4b, before we started tracking events.
I don't think we ever used it; in any case, we now use the `Ahoy::Chart`
class to deal with the stats Ahoy used to generate.
This commit is contained in:
Javi Martín
2024-04-24 02:34:55 +02:00
parent f4cb979cd6
commit 5df7b702ee
3 changed files with 6 additions and 4 deletions

View File

@@ -46,8 +46,6 @@ class Debate < ApplicationRecord
scope :featured, -> { where.not(featured_at: nil) }
scope :public_for_api, -> { all }
visitable class_name: "Visit"
attr_accessor :link_required
def self.recommendations(user)

View File

@@ -0,0 +1,5 @@
class RemoveVisitIdFromDebates < ActiveRecord::Migration[7.0]
def change
remove_column :debates, :visit_id, :string
end
end

View File

@@ -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_03_22_223950) do
ActiveRecord::Schema[7.0].define(version: 2024_04_24_002959) do
# These are extensions that must be enabled in order to support this database
enable_extension "pg_trgm"
enable_extension "plpgsql"
@@ -528,7 +528,6 @@ ActiveRecord::Schema[7.0].define(version: 2024_03_22_223950) do
t.integer "author_id"
t.datetime "created_at", precision: nil, null: false
t.datetime "updated_at", precision: nil, null: false
t.string "visit_id"
t.datetime "hidden_at", precision: nil
t.integer "flags_count", default: 0
t.datetime "ignored_flag_at", precision: nil