2017-07-23 11:26:04 +00:00
|
|
|
class CreateSettings < ActiveRecord::Migration[4.2]
|
2007-01-21 11:50:22 +00:00
|
|
|
def self.up
|
|
|
|
|
create_table :settings, :force => true do |t|
|
|
|
|
|
t.column "name", :string, :limit => 30, :default => "", :null => false
|
|
|
|
|
t.column "value", :text
|
|
|
|
|
end
|
2022-10-04 19:19:15 +00:00
|
|
|
|
2023-12-11 09:20:06 +00:00
|
|
|
# Persist default settings for new installations
|
|
|
|
|
Setting.create!(name: 'default_notification_option', value: Setting.default_notification_option)
|
|
|
|
|
Setting.create!(name: 'text_formatting', value: Setting.text_formatting)
|
2025-06-01 20:41:16 +00:00
|
|
|
Setting.create!(name: 'wiki_tablesort_enabled', value: Setting.wiki_tablesort_enabled)
|
2007-01-21 11:50:22 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def self.down
|
|
|
|
|
drop_table :settings
|
|
|
|
|
end
|
|
|
|
|
end
|