update rake to shop_create
This commit is contained in:
@@ -1,6 +1,11 @@
|
||||
namespace :manual_data do
|
||||
desc "Add Manual Data"
|
||||
task :add, [:shop_code] => :environment do |t, args|
|
||||
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|
|
||||
|
||||
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())")
|
||||
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},
|
||||
{lookup_type:'gateway_communication_type',name: 'USB',value: 'usb',shop_code: args.shop_code}])
|
||||
puts " Finished gateway_communication_type Set Up Data"
|
||||
Reference in New Issue
Block a user