Remove unused columns from display_ad_events (#6806) [deploy]
This commit is contained in:
parent
b833c6c667
commit
cf94d0ba98
3 changed files with 9 additions and 8 deletions
|
|
@ -1,9 +1,4 @@
|
|||
class DisplayAdEvent < ApplicationRecord
|
||||
self.ignored_columns = %w[
|
||||
context_id
|
||||
counts_for
|
||||
]
|
||||
|
||||
belongs_to :display_ad
|
||||
belongs_to :user
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,8 @@
|
|||
class RemoveUnusedColumnsFromDisplayAdEvents < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
safety_assured do
|
||||
remove_column :display_ad_events, :context_id, :bigint
|
||||
remove_column :display_ad_events, :counts_for, :integer, default: 1
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 2020_03_11_170959) do
|
||||
ActiveRecord::Schema.define(version: 2020_03_24_113133) do
|
||||
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "plpgsql"
|
||||
|
|
@ -416,9 +416,7 @@ ActiveRecord::Schema.define(version: 2020_03_11_170959) do
|
|||
|
||||
create_table "display_ad_events", force: :cascade do |t|
|
||||
t.string "category"
|
||||
t.bigint "context_id"
|
||||
t.string "context_type"
|
||||
t.integer "counts_for", default: 1
|
||||
t.datetime "created_at", null: false
|
||||
t.integer "display_ad_id"
|
||||
t.datetime "updated_at", null: false
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue