Details
-
Type:
Bug
-
Status: Closed (View Workflow)
-
Priority:
P2
-
Resolution: Done
-
Affects Version/s: None
-
Fix Version/s: 1.8.2
-
Labels:
-
Template:
-
Sprint:Folijet Sprint 91
-
Story Points:0.5
-
Development Team:Folijet
-
Release:Q2 2020
-
Epic Link:
Description
We faced the following error when upgrading this module from v1.7.2 to v1.8.1.
POST request for mod-data-import-converter-storage-1.8.1 /_/tenant failed with 400: [ " DELETE FROM fs09000000_mod_data_import_converter_storage.match_profiles WHERE id IN ('01bf0774-65dd-417f-8c76-4a417086ee20', 'cdf0ca3a-b515-4abd-82b6-48ce65374963', 'a3510db6-5b3a-48ed-96c0-99a03df87b79', 'ab32efdb-43c2-4cb5-b7dc-49dd45c02106', '88bb7c9f-79f2-4a97-b600-535f1d913378', 'ab05c370-7b9d-400f-962b-cb7953b940dd', 'afe7eb12-ea47-4970-8d0e-981b988aed0c', '23cec3f0-092c-4201-9ffc-643f61da03d8', '054a185d-f90b-409d-9203-4cc389e20d13', '1490430a-4d72-494b-ae6b-a8e4d9614e0e', '4c1d47ba-c527-4ef1-b497-42676c82254f', '727c67ff-6015-4279-8d5f-8b775f736114');” ]
When we ran the DELETE query manually on the DB, found that the migration script was trying to delete data from match_profiles that had references to other tables.
ERROR: update or delete on table "match_profiles" violates foreign key constraint "job_to_match_profiles_detailprofileid_fkey" on table "job_to_match_profiles" DETAIL: Key (id)=(cdf0ca3a-b515-4abd-82b6-48ce65374963) is still referenced from table "job_to_match_profiles". SQL state: 23503 ERROR: update or delete on table "match_profiles" violates foreign key constraint "match_to_action_profiles_masterprofileid_fkey" on table "match_to_action_profiles" DETAIL: Key (id)=(cdf0ca3a-b515-4abd-82b6-48ce65374963) is still referenced from table "match_to_action_profiles". SQL state: 23503
Had to run queries like below to clean it all up and for upgrade to be successful.
DELETE FROM fs09000000_mod_data_import_converter_storage.job_to_match_profiles WHERE detailprofileid='afe7eb12-ea47-4970-8d0e-981b988aed0c'; DELETE FROM fs09000000_mod_data_import_converter_storage.match_to_action_profiles WHERE masterprofileid='afe7eb12-ea47-4970-8d0e-981b988aed0c'; DELETE FROM fs09000000_mod_data_import_converter_storage.match_to_match_profiles WHERE masterprofileid='054a185d-f90b-409d-9203-4cc389e20d13';
Please provide migration scripts for the above for all ids being referenced in the list above.
TestRail: Results
Attachments
Issue Links
- blocks
-
MODDICONV-133 Release v1.8.2
-
- Closed
-
- defines
-
UXPROD-2220 NFR: Data Import (Batch Importer for Bib Acq) & PubSub Q2 2020 Technical, NFR, & Misc bug work
-
- Closed
-