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:
@@ -46,8 +46,6 @@ class Debate < ApplicationRecord
|
|||||||
scope :featured, -> { where.not(featured_at: nil) }
|
scope :featured, -> { where.not(featured_at: nil) }
|
||||||
scope :public_for_api, -> { all }
|
scope :public_for_api, -> { all }
|
||||||
|
|
||||||
visitable class_name: "Visit"
|
|
||||||
|
|
||||||
attr_accessor :link_required
|
attr_accessor :link_required
|
||||||
|
|
||||||
def self.recommendations(user)
|
def self.recommendations(user)
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
class RemoveVisitIdFromDebates < ActiveRecord::Migration[7.0]
|
||||||
|
def change
|
||||||
|
remove_column :debates, :visit_id, :string
|
||||||
|
end
|
||||||
|
end
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
#
|
#
|
||||||
# It's strongly recommended that you check this file into your version control system.
|
# 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
|
# These are extensions that must be enabled in order to support this database
|
||||||
enable_extension "pg_trgm"
|
enable_extension "pg_trgm"
|
||||||
enable_extension "plpgsql"
|
enable_extension "plpgsql"
|
||||||
@@ -528,7 +528,6 @@ ActiveRecord::Schema[7.0].define(version: 2024_03_22_223950) do
|
|||||||
t.integer "author_id"
|
t.integer "author_id"
|
||||||
t.datetime "created_at", precision: nil, null: false
|
t.datetime "created_at", precision: nil, null: false
|
||||||
t.datetime "updated_at", precision: nil, null: false
|
t.datetime "updated_at", precision: nil, null: false
|
||||||
t.string "visit_id"
|
|
||||||
t.datetime "hidden_at", precision: nil
|
t.datetime "hidden_at", precision: nil
|
||||||
t.integer "flags_count", default: 0
|
t.integer "flags_count", default: 0
|
||||||
t.datetime "ignored_flag_at", precision: nil
|
t.datetime "ignored_flag_at", precision: nil
|
||||||
|
|||||||
Reference in New Issue
Block a user