Sha256: 1d7e562d0fe5e8a0b291f4d561f6b6a2e0a9c30b540f82550f220411b2522fba

Contents?: true

Size: 714 Bytes

Versions: 4

Compression:

Stored size: 714 Bytes

Contents

class CreateEcmCmsNavigationItems < ActiveRecord::Migration
  def change
    create_table :ecm_cms_navigation_items do |t|
      t.string :name
      t.string :url
      t.string :key
      t.string :options
      t.text   :properties, null: true

      # associations
      t.references :ecm_cms_navigation
      t.references :ecm_cms_page

      # awesome nested set
      t.references :parent
      t.integer :children_count, default: 0, null: false
      t.integer :lft
      t.integer :rgt
      t.integer :depth

      # friendly id
      t.string :slug

      t.timestamps
    end
    add_index :ecm_cms_navigation_items, :ecm_cms_navigation_id
    add_index :ecm_cms_navigation_items, :parent_id
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ecm_cms2-1.1.1 db/migrate/006_create_ecm_cms_navigation_items.rb
ecm_cms2-1.1.0 db/migrate/006_create_ecm_cms_navigation_items.rb
ecm_cms2-1.0.1 db/migrate/006_create_ecm_cms_navigation_items.rb
ecm_cms2-1.0.0 db/migrate/006_create_ecm_cms_navigation_items.rb