16 lines
292 B
Ruby
16 lines
292 B
Ruby
# -*- encoding : utf-8 -*-
|
|
class CreateMenu < ActiveRecord::Migration
|
|
def self.up
|
|
create_table :menus do |t|
|
|
t.string :name
|
|
t.string :max_levels
|
|
t.timestamps
|
|
end
|
|
Menu.create(:name => "Menu principal", :max_levels => 3)
|
|
end
|
|
|
|
def self.down
|
|
drop_table :menus
|
|
end
|
|
end
|