Sha256: 157f179f170c3b2740a6796e7d2175bcfdeb68f6cffc07593311e07175cbecdd

Contents?: true

Size: 622 Bytes

Versions: 3

Compression:

Stored size: 622 Bytes

Contents

class CreateSettings < ActiveRecord::Migration

  def self.up
    create_table :settings do |t|
      t.string :site_name
      t.string :site_tagline
      t.boolean :enable_comments_in_pages, default: false
      t.boolean :disable_blog, default: false
      t.string :blog_name
      t.string :blog_tagline
      t.boolean :enable_comments_in_blog, default: true
      t.timestamps
    end
    Setting.create_translation_table! :site_name => :string, :site_tagline => :string, :blog_name => :string, :blog_tagline => :string
  end

  def self.down
    drop_table :settings
    Setting.drop_translation_table!
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
tkh_admin_panel-0.10 lib/generators/tkh_admin_panel/create_or_update_migrations/templates/create_settings.rb
tkh_admin_panel-0.9.27 lib/generators/tkh_admin_panel/create_or_update_migrations/templates/create_settings.rb
tkh_admin_panel-0.9.26 lib/generators/tkh_admin_panel/create_or_update_migrations/templates/create_settings.rb