From 839fb144366b6b5affaa24cd540dfb5f91bb14ee Mon Sep 17 00:00:00 2001 From: Aung Myo Date: Tue, 13 Feb 2018 11:34:06 +0630 Subject: [PATCH 1/2] update inventory --- app/views/layouts/_left_sidebar.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/layouts/_left_sidebar.html.erb b/app/views/layouts/_left_sidebar.html.erb index 57f05179..9bffd4d7 100755 --- a/app/views/layouts/_left_sidebar.html.erb +++ b/app/views/layouts/_left_sidebar.html.erb @@ -68,12 +68,12 @@ <% end %> <% if can? :menage, Inventory %> - + <%end%>
  • <%= t :backend %>
  • From 5ef5ff4fbefa68eafbb6dfbf9246da181cec68c6 Mon Sep 17 00:00:00 2001 From: phyusin Date: Tue, 13 Feb 2018 13:29:19 +0630 Subject: [PATCH 2/2] add column to existing table and new table for second display images --- .../20180213050551_add_image_path_to_employees.rb | 9 +++++++++ .../20180213050631_add_image_path_to_customers.rb | 9 +++++++++ ...180213052206_add_image_path_to_commissioners.rb | 9 +++++++++ db/migrate/20180213053009_create_display_images.rb | 14 ++++++++++++++ 4 files changed, 41 insertions(+) create mode 100644 db/migrate/20180213050551_add_image_path_to_employees.rb create mode 100644 db/migrate/20180213050631_add_image_path_to_customers.rb create mode 100644 db/migrate/20180213052206_add_image_path_to_commissioners.rb create mode 100644 db/migrate/20180213053009_create_display_images.rb diff --git a/db/migrate/20180213050551_add_image_path_to_employees.rb b/db/migrate/20180213050551_add_image_path_to_employees.rb new file mode 100644 index 00000000..bb26e888 --- /dev/null +++ b/db/migrate/20180213050551_add_image_path_to_employees.rb @@ -0,0 +1,9 @@ +class AddImagePathToEmployees < ActiveRecord::Migration[5.1] + def change + add_column :employees, :image_path, :string + end + + def down + remove_column :image_path + end +end diff --git a/db/migrate/20180213050631_add_image_path_to_customers.rb b/db/migrate/20180213050631_add_image_path_to_customers.rb new file mode 100644 index 00000000..11eecdc0 --- /dev/null +++ b/db/migrate/20180213050631_add_image_path_to_customers.rb @@ -0,0 +1,9 @@ +class AddImagePathToCustomers < ActiveRecord::Migration[5.1] + def change + add_column :customers, :image_path, :string + end + + def down + remove_column :image_path + end +end diff --git a/db/migrate/20180213052206_add_image_path_to_commissioners.rb b/db/migrate/20180213052206_add_image_path_to_commissioners.rb new file mode 100644 index 00000000..f61dce61 --- /dev/null +++ b/db/migrate/20180213052206_add_image_path_to_commissioners.rb @@ -0,0 +1,9 @@ +class AddImagePathToCommissioners < ActiveRecord::Migration[5.1] + def change + add_column :commissioners, :image_path, :string + end + + def down + remove_column :image_path + end +end diff --git a/db/migrate/20180213053009_create_display_images.rb b/db/migrate/20180213053009_create_display_images.rb new file mode 100644 index 00000000..f40a9179 --- /dev/null +++ b/db/migrate/20180213053009_create_display_images.rb @@ -0,0 +1,14 @@ +class CreateDisplayImages < ActiveRecord::Migration[5.1] + def change + create_table :display_images do |t| + t.integer :shop_id + t.binary :image + t.string :created_by + t.timestamps + end + end + + def down + drop_table :display_images + end +end