Remove unused columns from polls (#7125)
This commit is contained in:
parent
cc8168f794
commit
9dc8d1dc3d
3 changed files with 8 additions and 6 deletions
|
|
@ -1,8 +1,4 @@
|
|||
class Poll < ApplicationRecord
|
||||
self.ignored_columns = %w[
|
||||
allow_multiple_selections
|
||||
]
|
||||
|
||||
attr_accessor :poll_options_input_array
|
||||
|
||||
serialize :voting_data
|
||||
|
|
|
|||
|
|
@ -0,0 +1,7 @@
|
|||
class RemoveUnusedColumnsFromPolls < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
safety_assured do
|
||||
remove_column :polls, :allow_multiple_selections, :boolean, default: false
|
||||
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_31_155903) do
|
||||
ActiveRecord::Schema.define(version: 2020_04_07_083405) do
|
||||
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "plpgsql"
|
||||
|
|
@ -855,7 +855,6 @@ ActiveRecord::Schema.define(version: 2020_03_31_155903) do
|
|||
end
|
||||
|
||||
create_table "polls", force: :cascade do |t|
|
||||
t.boolean "allow_multiple_selections", default: false
|
||||
t.bigint "article_id"
|
||||
t.datetime "created_at", null: false
|
||||
t.integer "poll_options_count", default: 0, null: false
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue