Sha256: 78f83170a752af25310a8ed57bf4748712510cb2ef684d65a2138bfba1e1174b

Contents?: true

Size: 717 Bytes

Versions: 6

Compression:

Stored size: 717 Bytes

Contents

class CreateEcmCmsNavigationItems < ActiveRecord::Migration[4.2]
  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

6 entries across 6 versions & 1 rubygems

Version Path
ecm_cms2-5.1.2 db/migrate/006_create_ecm_cms_navigation_items.rb
ecm_cms2-5.1.1 db/migrate/006_create_ecm_cms_navigation_items.rb
ecm_cms2-5.1.0 db/migrate/006_create_ecm_cms_navigation_items.rb
ecm_cms2-5.0.0 db/migrate/006_create_ecm_cms_navigation_items.rb
ecm_cms2-4.1.1 db/migrate/006_create_ecm_cms_navigation_items.rb
ecm_cms2-4.1.0 db/migrate/006_create_ecm_cms_navigation_items.rb