Increase choices size for polls

MariaDB/MySQL stores the array as serialized string, so the current
limit of 255 is too small to store all choices.
This commit is contained in:
Patrick Gansterer 2020-07-30 22:22:57 +02:00
parent d90d188dbf
commit 6b400b4f96
3 changed files with 11 additions and 1 deletions

View file

@ -0,0 +1,5 @@
class IncreaseChoicesSize < ActiveRecord::Migration
def up
change_column :polls, :choices, :text, limit: 65535
end
end

View file

@ -428,7 +428,7 @@ ActiveRecord::Schema.define(version: 20181205010000) do
t.text "required_ordergroup_custom_fields", limit: 65535
t.text "required_user_custom_fields", limit: 65535
t.integer "voting_method", limit: 4, null: false
t.string "choices", limit: 255, null: false
t.text "choices", limit: 65535, null: false
t.integer "final_choice", limit: 4
t.integer "multi_select_count", limit: 4, default: 0, null: false
t.integer "min_points", limit: 4

View file

@ -0,0 +1,5 @@
class IncreaseChoicesSize < ActiveRecord::Migration
def up
change_column :polls, :choices, :text, limit: 65535
end
end