menu and menu_category
This commit is contained in:
13
db/migrate/20170325103022_create_rooms.rb
Normal file
13
db/migrate/20170325103022_create_rooms.rb
Normal file
@@ -0,0 +1,13 @@
|
||||
class CreateRooms < ActiveRecord::Migration[5.0]
|
||||
def change
|
||||
create_table :rooms do |t|
|
||||
t.string :name, :null => false
|
||||
t.integer :seater, :null => false, :default => 4
|
||||
t.string :created_by
|
||||
t.boolean :is_active, :null => false, :default => true
|
||||
t.integer :order_by
|
||||
t.references :zone
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
13
db/migrate/20170325111608_create_menus.rb
Normal file
13
db/migrate/20170325111608_create_menus.rb
Normal file
@@ -0,0 +1,13 @@
|
||||
class CreateMenus < ActiveRecord::Migration[5.0]
|
||||
def change
|
||||
create_table :menus do |t|
|
||||
t.string :name
|
||||
t.boolean :is_active, :null => false
|
||||
t.string :valid_days, :null => false, :default => "1,2,3,4,5,6,7"
|
||||
t.time :valid_time_from, :null => false, :default => "00:00:00"
|
||||
t.time :valid_time_to, :null => false, :default => "23:59:59"
|
||||
t.string :created_by
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
13
db/migrate/20170327152733_create_menu_categories.rb
Normal file
13
db/migrate/20170327152733_create_menu_categories.rb
Normal file
@@ -0,0 +1,13 @@
|
||||
class CreateMenuCategories < ActiveRecord::Migration[5.0]
|
||||
def change
|
||||
create_table :menu_categories do |t|
|
||||
t.references :menu, foreign_key: true
|
||||
t.string :name, :null => false
|
||||
t.string :alt_name
|
||||
t.integer :order_by
|
||||
t.integer :parent_category_id
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user