heylium_app/db/migrate/0003_create_menu.rb
Nicolas Bally 8e18de4077 initial
2016-08-03 00:22:29 +02:00

17 lines
311 B
Ruby
Executable File

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