0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-06 13:08:40 +08:00
discourse/plugins/poll/db/migrate/20250817090000_add_dynamic_to_polls.rb
Sam f0fc5646dc
FEATURE: dynamic poll support (#34368)
If a poll is created with `dynamic-poll=true`
then options can be amended after you post poll.

This is useful for polls like: "favorite IDE" where you want
people to easily be allowed to add options.

---------

Co-authored-by: Martin Brennan <martin@discourse.org>
2025-08-19 16:43:36 +10:00

11 lines
229 B
Ruby
Vendored

# frozen_string_literal: true
class AddDynamicToPolls < ActiveRecord::Migration[7.0]
def up
add_column :polls, :dynamic, :boolean, default: false, null: false
end
def down
remove_column :polls, :dynamic
end
end