Files
sx-fc/db/migrate/20170331024749_create_menu_items.rb
2017-04-17 13:09:54 +06:30

20 lines
691 B
Ruby

class CreateMenuItems < ActiveRecord::Migration[5.0]
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 :type, :null => false, :default => "SimpleMenuItem"
t.references :menu_category, foreign_key: true
t.references :menu_item, 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