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 465B

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 text_formatting default setting for new installations
  8. setting = Setting.new(:name => "text_formatting", :value => Setting.text_formatting)
  9. setting.save!
  10. end
  11. def self.down
  12. drop_table :settings
  13. end
  14. end