@@ -49,17 +49,17 @@ protected function doExecute(LoggerInterface $logger, $dryRun = false)
4949 'FROM orocrm_sales_b2bcustomer WHERE account_id IS NULL ' ;
5050 $ customersWithoutAccount = $ this ->connection ->fetchAll ($ query );
5151 foreach ($ customersWithoutAccount as $ customer ) {
52- $ query = 'INSERT INTO orocrm_account SET user_owner_id = :user_owner_id, ' .
53- 'organization_id = : organization_id, name = :name , createdAt = :createdAt, ' .
54- 'updatedAt = :updatedAt, serialized_data = :serialized_data ' ;
52+ $ query = 'INSERT INTO orocrm_account ' .
53+ '(user_owner_id, organization_id, name, createdAt, updatedAt, serialized_data) ' .
54+ 'VALUES(:user_owner_id, :organization_id, :name, :createdAt, :updatedAt, :serialized_data) ' ;
5555 $ this ->connection ->executeQuery (
5656 $ query ,
5757 [
5858 'user_owner_id ' => $ customer ['user_owner_id ' ],
5959 'organization_id ' => $ customer ['organization_id ' ],
6060 'name ' => $ customer ['name ' ],
61- 'createdAt ' => $ customer ['createdAt ' ],
62- 'updatedAt ' => $ customer ['updatedAt ' ],
61+ 'createdAt ' => isset ( $ customer ['createdAt ' ]) ? $ customer [ ' createdAt ' ] : $ customer [ ' createdat ' ],
62+ 'updatedAt ' => isset ( $ customer ['updatedAt ' ]) ? $ customer [ ' updatedAt ' ] : $ customer [ ' updatedat ' ],
6363 'serialized_data ' => base64_encode (serialize (null )),
6464 ],
6565 [
0 commit comments