Reply To: Unable to apply patch 318. Found foreign key table

#1106
kerryww
Participant

Hi, thanks for the info and help, but eventhough I’ve followed your directions and attemped the proceedure numerous times I still keep getting the same error in the log file.

Do you have any other suggestions?

Thanks again for your help.

Log file error:

[14-Aug-2020 00:09:54 America/Los_Angeles] SqlPatchManager::runSqlPatch() – SqlPatchManager::prePatch318() = Unable to set Foreign Keys.
[14-Aug-2020 00:15:48 America/Los_Angeles]
Unable to apply patch 318. Found foreign key table columns with values not in
the reference table column. The following list shows what values in foreign
key columns are missing from reference columns.

There two ways to fix this situation. Either change the row columns to reference
an existing record in the REFERENCE TABLE, or delete the rows that contain
the invalid columns.

To do this, the following example of the SQL statements to execute for the test
case where the ‘cron_log’ table contains invalid values ‘2’ and ‘3’ in the
‘cron_id’ column. The SQL statements to consider using are:

UPDATE si_cron_log SET cron_id = 6 WHERE cron_id IN (2,3);
—- or —-
DELETE FROM si_cron_log WHERE cron_id IN (2,3);

FOREIGN KEY TABLE COLUMN REFERENCE TABLE COLUMN INVALID VALUE
———————— —————— ———————– ——— ————-
invoices biller_id biller id 0
invoices customer_id customers id 0
invoices type_id invoice_type inv_ty_id 0
invoices preference_id preferences pref_id 0

[14-Aug-2020 00:15:48 America/Los_Angeles] SqlPatchManager::runSqlPatch() – SqlPatchManager::prePatch318() = Unable to set Foreign Keys.

Attachments:
You must be logged in to view attached files.