Remove unused columns from poll options (#7124)

Co-authored-by: Ben Halpern <bendhalpern@gmail.com>
This commit is contained in:
rhymes 2020-04-07 19:15:45 +02:00 committed by GitHub
parent c6756a326f
commit bbf60f8ed2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 5 deletions

View file

@ -1,8 +1,4 @@
class PollOption < ApplicationRecord
self.ignored_columns = %w[
counts_in_tabulation
]
belongs_to :poll
has_many :poll_votes

View file

@ -0,0 +1,7 @@
class RemoveUnusedColumnsFromPollOptions < ActiveRecord::Migration[5.2]
def change
safety_assured do
remove_column :poll_options, :counts_in_tabulation, :boolean
end
end
end

View file

@ -820,7 +820,6 @@ ActiveRecord::Schema.define(version: 2020_04_07_091449) do
end
create_table "poll_options", force: :cascade do |t|
t.boolean "counts_in_tabulation"
t.datetime "created_at", null: false
t.string "markdown"
t.bigint "poll_id"