Files
sx-fc/db/migrate/20170331024749_create_menu_items.rb
2017-06-08 09:57:33 +06:30

25 lines
822 B
Ruby

class CreateMenuItems < ActiveRecord::Migration[5.1]
def change
create_table :menu_items do |t|
t.string :item_code, :null => false
t.string :name, :null => false
t.string :alt_name
t.string :image_path
t.text :description
t.string :information
t.string :type, :null => false, :default => "SimpleMenuItem"
t.references :menu_category, foreign_key: true
t.references :menu_item, foreign_key: true
t.references :account, foreign_key: true
t.integer :min_qty, :null => false, :default => 1
t.boolean :taxable, :null => false, :default => true
t.integer :min_selectable_item, :null => false, :default => 1
t.integer :max_selectable_item, :null => false, :default => 1
t.string :created_by
t.timestamps
end
end
end