Merge branch 'august_spring' of bitbucket.org:code2lab/sxrestaurant into august_spring
* 'august_spring' of bitbucket.org:code2lab/sxrestaurant: (71 commits) Update Coupon / Voucher data change update menu_sync update addorder update addorder view add fields for Menu Sync update add oreder add menu api update add order and calculate subtotal update seed menu ui update update ability for setmenu fixed update show for foc add bootstrap file input and menu item img implemented update foc and pdf update menu item update receipt bill pdf for foc and credit add CarrierWave gems for menu image upload add CarrierWave gems for menu image upload ...
This commit is contained in:
@@ -8,7 +8,7 @@ class CreateMenuCategories < ActiveRecord::Migration[5.1]
|
||||
t.integer :order_by
|
||||
t.string :created_by, :null => false
|
||||
t.references :menu_category, :null => true
|
||||
|
||||
t.boolean :is_available, :null => false, :default => true
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
class CreateMenuItems < ActiveRecord::Migration[5.1]
|
||||
def change
|
||||
create_table :menu_items do |t|
|
||||
@@ -10,12 +9,16 @@ class CreateMenuItems < ActiveRecord::Migration[5.1]
|
||||
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.json :item_attributes
|
||||
t.json :item_options
|
||||
# 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.boolean :is_sub_item, :null => false, :default => false
|
||||
t.boolean :is_available, :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
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
class CreateMenuItemOptions < ActiveRecord::Migration[5.1]
|
||||
def change
|
||||
create_table :menu_item_options do |t|
|
||||
t.string :option_type
|
||||
t.string :name, :null => false
|
||||
t.string :value, :null => false
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ class CreateMenuItemInstances < ActiveRecord::Migration[5.1]
|
||||
t.boolean :is_on_promotion, :null => false, :default => false
|
||||
t.decimal :promotion_price, :precision => 10, :scale => 2, :null => false, :default => 0.00
|
||||
t.boolean :is_available, :null => false, :default => true
|
||||
t.boolean :is_default, :null => false, :default => true
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
|
||||
@@ -19,6 +19,7 @@ class CreateShops < ActiveRecord::Migration[5.1]
|
||||
t.string :owner_token
|
||||
t.string :id_prefix, :null => false, :limit => 3
|
||||
t.boolean :is_rounding_adj, :default => false
|
||||
t.boolean :quick_sale_summary, :default => false
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
|
||||
@@ -3,11 +3,7 @@ class CreatePrintSettings < ActiveRecord::Migration[5.1]
|
||||
create_table :print_settings do |t|
|
||||
t.string :name, :null => false
|
||||
t.string :unique_code, :null => false
|
||||
t.string :template
|
||||
t.string :db_name
|
||||
t.string :db_type
|
||||
t.string :db_username
|
||||
t.string :db_password
|
||||
t.string :template
|
||||
t.string :printer_name, :null => false
|
||||
t.string :api_settings
|
||||
t.decimal :page_width, :null => false, :default => 200
|
||||
|
||||
12
db/migrate/20170811071000_create_item_sets.rb
Normal file
12
db/migrate/20170811071000_create_item_sets.rb
Normal file
@@ -0,0 +1,12 @@
|
||||
class CreateItemSets < ActiveRecord::Migration[5.1]
|
||||
def change
|
||||
create_table :item_sets do |t|
|
||||
t.string :name
|
||||
t.string :alt_name
|
||||
t.integer :min_selectable_qty
|
||||
t.integer :max_selectable_qty
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
10
db/migrate/20170811071108_create_menu_item_sets.rb
Normal file
10
db/migrate/20170811071108_create_menu_item_sets.rb
Normal file
@@ -0,0 +1,10 @@
|
||||
class CreateMenuItemSets < ActiveRecord::Migration[5.1]
|
||||
def change
|
||||
create_table :menu_item_sets do |t|
|
||||
t.references :item_set, foreign_key: true
|
||||
t.references :menu_item, foreign_key: true
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
10
db/migrate/20170811071327_create_menu_instance_item_sets.rb
Normal file
10
db/migrate/20170811071327_create_menu_instance_item_sets.rb
Normal file
@@ -0,0 +1,10 @@
|
||||
class CreateMenuInstanceItemSets < ActiveRecord::Migration[5.1]
|
||||
def change
|
||||
create_table :menu_instance_item_sets do |t|
|
||||
t.references :item_set, foreign_key: true
|
||||
t.references :menu_item_instance, foreign_key: true
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1,8 +0,0 @@
|
||||
class RemoveDBcolsFromPrintSettings < ActiveRecord::Migration[5.1]
|
||||
def change
|
||||
remove_column :print_settings, :db_name, :string
|
||||
remove_column :print_settings, :db_type, :string
|
||||
remove_column :print_settings, :db_username, :string
|
||||
remove_column :print_settings, :db_password, :string
|
||||
end
|
||||
end
|
||||
@@ -2,7 +2,6 @@ class SettingsProducts < ActiveRecord::Migration[5.1]
|
||||
def change
|
||||
create_table :products do |t|
|
||||
t.string :item_code, :limit => 16
|
||||
|
||||
t.string :name, :null => false
|
||||
t.string :alt_name
|
||||
t.integer :unit_price
|
||||
|
||||
Reference in New Issue
Block a user