You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

017_create_settings.rb 521B

12345678910111213141516
  1. class CreateSettings < ActiveRecord::Migration[4.2]
  2. def self.up
  3. create_table :settings, :force => true do |t|
  4. t.column "name", :string, :limit => 30, :default => "", :null => false
  5. t.column "value", :text
  6. end
  7. # Persist default settings for new installations
  8. Setting.create!(name: 'default_notification_option', value: Setting.default_notification_option)
  9. Setting.create!(name: 'text_formatting', value: Setting.text_formatting)
  10. end
  11. def self.down
  12. drop_table :settings
  13. end
  14. end