Why is Package not uninstalling correct?

CreditFields.zip

Above is a link to the package I am using. 

The package installs just fine, yet when I uninstall it I get the following errors.

Wed Sep 30 16:05:49 2020 [6385][1][ALERT]  Query Failed: ALTER TABLE campaigns_cstm drop COLUMN high_school_c: MySQL error 1091: Can't DROP 'high_school_c'; check that column/key exists
Wed Sep 30 16:05:50 2020 [6385][1][ALERT]  Query Failed: ALTER TABLE contacts_cstm drop COLUMN parent_1_address: MySQL error 1091: Can't DROP 'parent_1_address'; check that column/key exists
Wed Sep 30 16:05:53 2020 [6385][1][ALERT]  Query Failed: ALTER TABLE contacts_cstm drop COLUMN parent_2_address: MySQL error 1091: Can't DROP 'parent_2_address'; check that column/key exists
Wed Sep 30 16:06:15 2020 [6385][1][ALERT]  Query Failed: ALTER TABLE leads_cstm drop COLUMN parent_2_address: MySQL error 1091: Can't DROP 'parent_2_address'; check that column/key exists
Then when I go to reinstall I have the following error.
Wed Sep 30 16:52:39 2020 [904][1][ALERT] Cannot create column Query Failed: ALTER TABLE contacts_cstm add COLUMN parent_1_address_c varchar(255)  NULL : MySQL error 1060: Duplicate column name 'parent_1_address_c'
Any ideas what is causing this issue?
  • Hi Amy,

    I think you should review your Manifest, divide it into modules , that will make easier for you to find out what is wrong.

    Rodrigo Manara

    Sr. Developer

  • This looks like generic mysql error. E.g. most of these errors are basically saying that what you are trying to do has already been done.
    e.g. Can't DROP 'high_school_c'; check that column/key exists -> indicates that there is no column high_school_c in your campaigns_cstm table.

    and MySQL error 1060: Duplicate column name 'parent_1_address_c' -> indicates that column 'parent_1_address_c' already exists in contacts_cstm table, so it can't be created.

    Check your information_schema in your database to see whether the columns you are trying to add/remove exist or not.

    E.g. check this query before you run the un-installer:

    SELECT COLUMN_NAME FROM information_schema.COLUMNS WHERE TABLE_NAME = 'campaigns_cstm';

    and look for high_school_c in the results.