discourse/db/migrate/20200302120829_add_theme_modifier_set.rb
David Taylor d1474e94a1
FEATURE: Allow themes to specify modifiers in their about.json file (#9097)
There are three modifiers:
- serialize_topic_excerpts (boolean)
- csp_extensions (array of strings)
- svg_icons (array of strings)

When multiple themes are active, the values will be combined. The combination method varies based on the setting. CSP/SVG arrays will be combined. serialize_topic_excerpts will use `Enumerable#any`.
2020-03-11 13:30:45 +00:00

12 lines
380 B
Ruby

# frozen_string_literal: true
class AddThemeModifierSet < ActiveRecord::Migration[6.0]
def change
create_table(:theme_modifier_sets) do |t|
t.references :theme, index: { unique: true }, null: false
t.column :serialize_topic_excerpts, :boolean
t.column :csp_extensions, :string, array: true
t.column :svg_icons, :string, array: true
end
end
end