1

I have recently installed and then uninstalled an extension (Cart2Quote) and now when I attempt to run the command:

php bin/magento setup:upgrade

I am getting the following error:

Notice: Undefined index: quotation_quote in /home/49555.cloudserv.com/ngjhhhsssf/public_html/vendor/magento/framework/Setup/Declaration/Schema/Db/SchemaBuilder.php on line 153

Any ideas?

TIA, Rob

9
  • 1
    Seems you removed the code, but the database changes still there Mar 4 at 7:27
  • 1
    Try to also delete all data from the generated directory. Run the command: "rm -rf generated/*" on Magento root and then run the upgrade command
    – Amit Saini
    Mar 4 at 7:31
  • @RaulSanchez - Thanks Raul - I did remove the associated data/rows from within the SETUP_MODULE table test still receiving the error.
    – ozmo
    Mar 4 at 7:42
  • 1
    Welcome @ozmo, Hope now upgrade command working fine.
    – Amit Saini
    Mar 4 at 9:01
  • 1
    @ozmo Follow this cart2quote.zendesk.com/hc/en-us/articles/…
    – Amit Saini
    Mar 4 at 9:33
2

It think it could be a foreign key constraint somewhere in some table still referencing the removed table from the extension.

You can check this by running the following SQL query in your database if 'quotation_quote' is a column name:

SELECT TABLE_NAME, COLUMN_NAME, CONSTRAINT_NAME, REFERENCED_TABLE_NAME, REFERENCED_COLUMN_NAME FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE WHERE REFERENCED_COLUMN_NAME = 'quotation_quote';

Or the following command if the 'quotation_quote' is the table:

SELECT TABLE_NAME, COLUMN_NAME, CONSTRAINT_NAME, REFERENCED_TABLE_NAME, REFERENCED_COLUMN_NAME FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE WHERE REFERENCED_TABLE_NAME = 'quotation_quote';

If you find matching results and you double-check that indeed this is the column added by the extension you uninstalled, then you can drop the constraint:

ALTER TABLE <TABLE_NAME> DROP FOREIGN KEY <CONSTRAINT_NAME>;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.