Class: CreateEtCmsPages

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/generators/et_cms/templates/pages.rb

Instance Method Summary collapse

Instance Method Details

#changeObject



2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/generators/et_cms/templates/pages.rb', line 2

def change
  create_table :et_cms_pages do |t|
    t.text :content
    t.string :browser_title
    t.string :name
    t.integer :parent_id
    t.string :meta_description
    t.boolean :exclude_from_menu
    t.string :link_url
    t.integer :list_order
    t.string :status
    t.string :slug

    t.timestamps
  end

  add_index :et_cms_pages, :slug, unique: true
end