47 lines
856 B
Ruby
47 lines
856 B
Ruby
# -*- encoding : utf-8 -*-
|
|
class MenuItems < ActiveRecord::Migration
|
|
def self.up
|
|
|
|
|
|
create_table :menu_items do |t|
|
|
t.string :name
|
|
t.string :slug
|
|
t.string :permalink
|
|
t.string :section_name
|
|
t.integer :section_id
|
|
t.string :repertoire_name
|
|
t.integer :repertoire_id
|
|
|
|
t.integer :parent_id
|
|
t.integer :position
|
|
|
|
t.boolean :super_admin
|
|
t.boolean :enabled
|
|
t.boolean :visible
|
|
t.boolean :deleted
|
|
|
|
t.references :menu
|
|
|
|
#polymorphic
|
|
t.integer :menu_content_id
|
|
t.string :menu_content_type
|
|
|
|
t.integer :archive_id
|
|
t.boolean :archived
|
|
t.datetime :archived_at
|
|
|
|
|
|
t.boolean :password
|
|
t.boolean :comment
|
|
|
|
|
|
t.timestamps
|
|
end
|
|
|
|
end
|
|
|
|
def self.down
|
|
drop_table :menu_items
|
|
end
|
|
end
|