SQLSTATE[22003]

Dear team of Ubertheme,
 
I have migrated Magento1 products into Magento2.
Now, as soon as I delete a product in the catalog, I get an error message.
 
Exception # 0 (Zend_Db_Statement_Exception): SQLSTATE [22003]: Numeric value out of range
 
In several forums, I have found posts, of which I conclude that Magento2 wants to change an entry in the database, which no longer exists. I also found out that in step 7 of the data migration process the missing entries are taken over.
Deleting the same products with an external product manager doesn’t throw an error.
 
How can I fix this issue?
 
Regards,
Arno

5 answers

Profile photo of Mall Staff 184060.00 $tone May 16, 2019
Public

Hi Arno,

 I also found out that in step 7 of the data migration process the missing entries are taken over.

Please explain in more details about the issue you mentioned.

Now, as soon as I delete a product in the catalog, I get an error message.
Exception # 0 (Zend_Db_Statement_Exception): SQLSTATE [22003]: Numeric value out of range

Our migration tool helped to migrate data only. It seems that issue relates to Magento’s function only. You can check out and try a workaround in this similar thread.  
Regards,
Mall.

#1
Profile photo of Mall Staff 184060.00 $tone May 16, 2019
Public

Hi there,

CDbCommand failed to execute the SQL statement: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘33750’ for key ‘PRIMARY’. The SQL statement executed was: INSERT INTO `quote` (`store_id`, `updated_at`, `is_active`, `is_virtual`, `is_multi_shipping`, 

That issue was because you checked the ‘KEEP ORIGINAL IDs’ setting in Step #7, while you have sample/testing data in your M2 sales data section.

To continue with the Keep Original IDs option, you need to delete such testing/sample data by running the followingSQL in your M2 database:

Delete From quote Where entity_id = 33750;

Once done, you can continue with data migration in step #7 by running the CLI command:
php -f bin/ubdatamigration run --step=7;

Regards,
Mall.

#3
Profile photo of ass83 20.00 $tone May 16, 2019
Public

Okay. Done.
Now, step7 has been executed. I still have the problem of non deletable products in catalog.
All of the solutions refer to a table called sales_flat.
This table is not synced through data migration while other tables like sales_creditmemo and sales_invoice are synced now.
Is that as it ought to be?
Can I import those tables manually to solve that issue?

#4
Profile photo of Mall Staff 184060.00 $tone May 17, 2019
Public

Hi there,

I still have the problem of non deletable products in catalog.
All of the solutions refer to a table called sales_flat.
This table is not synced through data migration while other tables like sales_creditmemo and sales_invoice are synced now.

It seems that you were not aware of new recent changes in the database structure of Magento2. Please check again and learn more about M2 database structure at your end. For instance, here’re some changes in the naming of some database tables: 

  • ‘sales_flat_order’ -> ‘sales_order’, 
  • ‘sales_flat_invoice’ -> ‘sales_invoice’ 
  • ‘sales_flat_shipment’ -> ‘sales_shipment’
  • etc…

Regards,
Mall.
 

#5

Please login or Register to Submit Answer

Written By

Comments