We migrated all data successfully to vanilla Magento 2, but after installing first extension, re-running sales migration presented the following error:
CDbCommand failed to execute the SQL statement: SQLSTATE[HY000]: General error: 1364 Field ‘matkahuolto_agent_id’ doesn’t have a default value. The SQL statement executed was: INSERT INTO `quote_address` (`quote_id`, `updated_at`, `save_in_address_book`, `same_as_billing`, `collect_shipping_rates`, `weight`, `subtotal`, `base_subtotal`, `subtotal_with_discount`, `base_subtotal_with_discount`, `tax_amount`, `base_tax_amount`, `shipping_amount`, `base_shipping_amount`, `discount_amount`, `base_discount_amount`, `grand_total`, `base_grand_total`, `created_at`, `address_type`, `email`, `firstname`, `lastname`, `street`, `city`, `postcode`, `country_id`, `telephone`, `shipping_tax_amount`, `base_shipping_tax_amount`, `applied_taxes`, `subtotal_incl_tax`, `shipping_incl_tax`, `base_shipping_incl_tax`, `free_shipping`) VALUES (:yp0, :yp1, :yp2, :yp3, :yp4, :yp5, :yp6, :yp7, :yp8, :yp9, :yp10, :yp11, :yp12, :yp13, :yp14, :yp15, :yp16, :yp17, :yp18, :yp19, :yp20, :yp21, :yp22, :yp23, :yp24, :yp25, :yp26, :yp27, :yp28, :yp29, :yp30, :yp31, :yp32, :yp33, :yp34)
How should we proceed?
13 answers
Hi there,
Field ‘matkahuolto_agent_id’ doesn’t have a default value.
That because after the first time using our tool. You have installed more third-party extensions. And the field named matkahuolto_agent_id` It was added by your third-party extension.
Let’s open your Magento2’s database and edit the table named `quote_address` and then set a default value for the field named `matkahuolto_agent_id`
Once done, you can continue with delta data migration in the step #7 with our tool.
Regards,
Mall.
Hi,
The `matkahuolto_agent_id’ field is a TEXT field so it does not allow default value. Is there another way? Can we somehow set the value of that field “” (empty) somewhere in your extension code?
Thank you. That removed that particular error, but presented another:
CDbCommand failed to execute the SQL statement: SQLSTATE[HY000]: General error: 1364 Field ‘matkahuolto_agent_id’ doesn’t have a default value. The SQL statement executed was: INSERT INTO `sales_order_address` (`parent_id`, `postcode`, `lastname`, `street`, `city`, `email`, `telephone`, `country_id`, `firstname`, `address_type`, `customer_id`, `customer_address_id`) VALUES (:yp0, :yp1, :yp2, :yp3, :yp4, :yp5, :yp6, :yp7, :yp8, :yp9, :yp10, :yp11)
I guess we have to do that to some other files as well?
Thank you. That seemed to work and I was able to re-migrate new data. I will continue with installing other extensions and get back to you if new problems arise.
Hi there,
Yeah, let’s contact me if you need further assistance.
Regards,
Mall.
Hi there,
Processing in step #7………….PHP Error[2]: include(prinetti_agent_id.php): failed to open stream: No such file or directory
That because your M1’s database has some records in the sales data section which has relation with the third-party extension named prinetti_agent
Kindly provide me the admin credentials, ssh credentials and web root path of your Magento2. I will check further and specify you more details about that issue and then tell you how to solve that.
Regards,
Mall.
Thank you very much. That worked perfectly.
Hi there,
You are welcome. Let’s contact me if you need further assistance.
Regards,
Mall.