24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
# File 'lib/shipping_backup_client/db/shipping_backup_db.rb', line 24
def self.connect_shipping_backup_db(mysql_config)
ActiveRecord::Base.logger = $logger
ActiveRecord::Base.include_root_in_json = false
ActiveRecord::Base.store_full_sti_class = true
ActiveSupport.use_standard_json_time_format = true
ActiveSupport.escape_html_entities_in_json = false
$logger.info("connecting to shipping_backup db using config : #{DB_DEFAULTS.merge(mysql_config).merge({'password' => '*******'})}") rescue nil
ShipmentDAO.establish_connection(DB_DEFAULTS.merge(mysql_config))
CustomerDAO.establish_connection(DB_DEFAULTS.merge(mysql_config))
ShippingLiteShipmentDAO.establish_connection(DB_DEFAULTS.merge(mysql_config))
ShipmentSellerMappingDAO.establish_connection(DB_DEFAULTS.merge(mysql_config))
SellerDAO.establish_connection(DB_DEFAULTS.merge(mysql_config))
ReturnSellerDAO.establish_connection(DB_DEFAULTS.merge(mysql_config))
ShipmentReturnSellerMappingsDAO.establish_connection(DB_DEFAULTS.merge(mysql_config))
PostalAddressDAO.establish_connection(DB_DEFAULTS.merge(mysql_config))
ElectronicAddressDAO.establish_connection(DB_DEFAULTS.merge(mysql_config))
TelecomNumberDAO.establish_connection(DB_DEFAULTS.merge(mysql_config))
ShipmentStatusHistoryDAO.establish_connection(DB_DEFAULTS.merge(mysql_config))
ShipmentScanAuditDAO.establish_connection(DB_DEFAULTS.merge(mysql_config))
ShipmentNoteDAO.establish_connection(DB_DEFAULTS.merge(mysql_config))
end
|