I have upgraded Magento from version 2.2.9 to 2.3.4 using the composer.
And run the setup: upgrade, then I am getting below error.
SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (
#sql-27b_17e
, CONSTRAINTQUOTE_ITEM_PARENT_ITEM_ID_QUOTE_ITEM_ITEM_ID
FOREIGN KEY (parent_item_id
) REFERENCESquote_item
(item_id
) ON DELETE CASCADE), query was: ALTER TABLEquote_item
MODIFY COLUMNitem_id
int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT "Item ID", MODIFY COLUMNquote_id
int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT "Quote ID", MODIFY COLUMNupdated_at
timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT "Updated At", MODIFY COLUMNproduct_id
int(10) UNSIGNED NULL COMMENT "Product ID", MODIFY COLUMNstore_id
smallint(5) UNSIGNED NULL COMMENT "Store ID", MODIFY COLUMNparent_item_id
int(10) UNSIGNED NULL COMMENT "Parent Item ID", MODIFY COLUMNdiscount_amount
decimal(20, 4) NULL DEFAULT 0 COMMENT "Discount Amount", MODIFY COLUMNbase_discount_amount
decimal(20, 4) NULL DEFAULT 0 COMMENT "Base Discount Amount", MODIFY COLUMNtax_amount
decimal(20, 4) NULL DEFAULT 0 COMMENT "Tax Amount", MODIFY COLUMNbase_tax_amount
decimal(20, 4) NULL DEFAULT 0 COMMENT "Base Tax Amount", MODIFY COLUMNrow_total
decimal(20, 4) NOT NULL DEFAULT 0 COMMENT "Row Total", MODIFY COLUMNbase_row_total
decimal(20, 4) NOT NULL DEFAULT 0 COMMENT "Base Row Total", MODIFY COLUMNrow_total_with_discount
decimal(20, 4) NULL DEFAULT 0 COMMENT "Row Total With Discount", MODIFY COLUMNbase_tax_before_discount
decimal(20, 4) NULL COMMENT "Base Tax Before Discount", MODIFY COLUMNtax_before_discount
decimal(20, 4) NULL COMMENT "Tax Before Discount", MODIFY COLUMNprice_incl_tax
decimal(20, 4) NULL COMMENT "Price Incl Tax", MODIFY COLUMNbase_price_incl_tax
decimal(20, 4) NULL COMMENT "Base Price Incl Tax", MODIFY COLUMNrow_total_incl_tax
decimal(20, 4) NULL COMMENT "Row Total Incl Tax", MODIFY COLUMNbase_row_total_incl_tax
decimal(20, 4) NULL COMMENT "Base Row Total Incl Tax", MODIFY COLUMNdiscount_tax_compensation_amount
decimal(20, 4) NULL COMMENT "Discount Tax Compensation Amount", MODIFY COLUMNbase_discount_tax_compensation_amount
decimal(20, 4) NULL COMMENT "Base Discount Tax Compensation Amount", MODIFY COLUMNgift_message_id
int(11) NULL COMMENT "Gift Message ID", ADD CONSTRAINTQUOTE_ITEM_PARENT_ITEM_ID_QUOTE_ITEM_ITEM_ID
FOREIGN KEY (parent_item_id
) REFERENCESquote_item
(item_id
) ON DELETE CASCADE, ADD CONSTRAINTQUOTE_ITEM_QUOTE_ID_QUOTE_ENTITY_ID
FOREIGN KEY (quote_id
) REFERENCESquote
(entity_id
) ON DELETE CASCADE, ADD CONSTRAINTQUOTE_ITEM_STORE_ID_STORE_STORE_ID
FOREIGN KEY (store_id
) REFERENCESstore
(store_id
) ON DELETE SET NULL