appirits/comable

View on GitHub
core/db/migrate/20150706085056_create_comable_navigation_item.rb

Summary

Maintainability
A
0 mins
Test Coverage
class CreateComableNavigationItem < ActiveRecord::Migration
  def change
    create_table :comable_navigation_items do |t|
      t.references :navigation, null: false
      t.integer :linkable_id
      t.string :linkable_type
      t.integer :position, null: false
      t.string :name, null: false
      t.string :url
      t.timestamps null: false
    end

    add_index :comable_navigation_items, [:position, :navigation_id]
  end
end