From 0a5aff4c948e6cbb908ab3409d0de816a3a4ee8e Mon Sep 17 00:00:00 2001 From: Thein Lin Kyaw Date: Mon, 20 Jan 2020 17:22:27 +0630 Subject: [PATCH] update rake task shop:create --- lib/tasks/shop_create.rake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/tasks/shop_create.rake b/lib/tasks/shop_create.rake index f872db36..1e533744 100644 --- a/lib/tasks/shop_create.rake +++ b/lib/tasks/shop_create.rake @@ -1,9 +1,9 @@ namespace :shop do desc "Create shop and seed data" - task :create, [:name, :shop_code, :client_name, :client_code, :address, :phone_no] => :environment do |t, args| + task :create, [:name, :shop_code, :subdomain, :client_name, :client_code, :address, :phone_no] => :environment do |t, args| ActiveRecord::Base.connection.execute("INSERT INTO shops (logo, name, shop_code, subdomain, client_name, client_code, address, township, city, state, country, phone_no, reservation_no, license, activated_at, license_data, base_currency, cloud_url, cloud_token, owner_token, id_prefix, is_rounding_adj, quick_sale_summary, calc_tax_order, show_account_info, note, created_at, updated_at) - VALUES (NULL, '#{args.name}', '#{args.shop_code}', '#{args.name}-#{args.shop_code}', '#{args.client_name}', '#{args.client_code}', '#{args.address}', '', '', '', '', '#{args.phone_no}', '111', '', CURRENT_TIMESTAMP(), 'test', '111', NULL, NULL, NULL, '111', 0, 0, 0, 1, CURRENT_TIMESTAMP(), CURRENT_TIMESTAMP())") + VALUES (NULL, '#{args.name}', '#{args.shop_code}', '#{args.subdomain}', '#{args.client_name}', '#{args.client_code}', '#{args.address}', '', '', '', '', '#{args.phone_no}', '111', '', CURRENT_TIMESTAMP(), 'test', '111', NULL, NULL, NULL, '111', 0, 0, 0, 1, CURRENT_TIMESTAMP(), CURRENT_TIMESTAMP())") logger.info " Shop created for #{args.name}-#{args.shop_code}" gateway_communication_type =Lookup.create([{lookup_type:'gateway_communication_type',name: 'API',value: 'api',shop_code: args.shop_code},