Hello,
I recently tried upgrading from Squash 8.1.1 to Squash 10, but I'm having an issue with starting Squash after installing the upgrade. I keep getting the following error message:
"Caused by: liquibase.exception.DatabaseException: ERROR: more than one row returned by a subquery used as an expression [Failed SQL: (0) UPDATE ITERATION
SET TEST_PLAN_ID = (
SELECT TEST_PLAN_ID
FROM TEST_PLAN
WHERE TMP_ITERATION_ID = ITERATION.ITERATION_ID
)]"
I checked our database and the TEST_PLAN table only has one record in it, so I can't see how more than one row was returned by the subquery.
Does anyone have any ideas on how to fix this?
I'm running Squash on Fedora 42 and PostgreSQL 16.8.
Issue upgrading from Squash 8.1 to Squash 10
-
joagonzalez64
- Messages : 4
- Inscription : mer. août 13, 2025 11:40 pm
Re: Issue upgrading from Squash 8.1 to Squash 10
Hello,
Thank you for sharing the details of your issue. Based on similar cases we have encountered in the past, this problem may occur when an iteration is linked to more than one campaign.
To check if this is the case in your database, you can run the following query on your production database.:
If this query returns any results, it means there are iterations attached to multiple campaigns, which is not expected and can cause the upgrade script to fail.
Xavier Squash Support Team
Thank you for sharing the details of your issue. Based on similar cases we have encountered in the past, this problem may occur when an iteration is linked to more than one campaign.
To check if this is the case in your database, you can run the following query on your production database.:
Code : Tout sélectionner
SELECT ci.ITERATION_ID, i.NAME, ci.CAMPAIGN_ID, c.NAME
FROM CAMPAIGN_ITERATION ci
JOIN ITERATION i on ci.ITERATION_ID = i.ITERATION_ID
JOIN CAMPAIGN_LIBRARY_NODE c on ci.CAMPAIGN_ID = c.CLN_ID
WHERE ci.ITERATION_ID IN (
SELECT ci2.ITERATION_ID
FROM CAMPAIGN_ITERATION ci2
JOIN CAMPAIGN_LIBRARY_NODE cln ON ci2.CAMPAIGN_ID = cln.CLN_ID
JOIN PROJECT p ON cln.PROJECT_ID = p.PROJECT_ID
GROUP BY ci2.ITERATION_ID
HAVING COUNT(*) > 1
);
- If this is the case, please send us the query response so that we can determine together what actions to take
Xavier Squash Support Team
-
joagonzalez64
- Messages : 4
- Inscription : mer. août 13, 2025 11:40 pm
Re: Issue upgrading from Squash 8.1 to Squash 10
Thank you for the response. Indeed, we do have two iteration IDs that are attached to two campaigns each. Please see the output of the query in the attachment.
- Pièces jointes
-
- Screenshot 2025-08-14 104938.png (11.68 Kio) Consulté 5797 fois
-
joagonzalez64
- Messages : 4
- Inscription : mer. août 13, 2025 11:40 pm
Re: Issue upgrading from Squash 8.1 to Squash 10
Just an update. We ended up deleting the two iterations I posted above, but we also ran into further issues with starting Squash even after deleting those iterations. We also had to delete 66 executions that did not have a test plan, and delete a test suite with no test plans. Once deleted, Squash started working again. Thank you again for your help. Hopefully this doesn't cause issues in future upgrades to Squash.
Re: Issue upgrading from Squash 8.1 to Squash 10
Hello,
Excellent news about your upgrade.
Deletion is indeed one of the possible solutions, but it was also possible to simply delete the link between iteration and campaign that should not have been there.
I have taken note of your executions and test suites. Normally, the v10 script already takes care of deleting orphaned executions, but it is possible that, depending on the version of Squash where these executions were performed, they were not detected as problematic.
Please do not hesitate to contact us if you need any further assistance.
Best regards,
Xavier Squash Support Team
Excellent news about your upgrade.
Deletion is indeed one of the possible solutions, but it was also possible to simply delete the link between iteration and campaign that should not have been there.
I have taken note of your executions and test suites. Normally, the v10 script already takes care of deleting orphaned executions, but it is possible that, depending on the version of Squash where these executions were performed, they were not detected as problematic.
Please do not hesitate to contact us if you need any further assistance.
Best regards,
Xavier Squash Support Team
Re: Issue upgrading from Squash 8.1 to Squash 10
This typically occurs when the upgrade script tries to update the ITERATION table and finds unexpected duplicates. In a real user report, the underlying cause turned out to be iterations linked to multiple campaigns, which violates data assumptions and triggers the failurejoagonzalez64 a écrit : ↑mer. août 13, 2025 11:50 pm Hello,
I recently tried upgrading from Squash 8.1.1 to Squash 10, but I'm having an issue with starting Squash after installing the upgrade. I keep getting the following error message:
"Caused by: liquibase.exception.DatabaseException: ERROR: more than one row returned by a subquery used as an expression [Failed SQL: (0) UPDATE ITERATION
SET TEST_PLAN_ID = (
SELECT TEST_PLAN_ID
FROM TEST_PLAN
WHERE TMP_ITERATION_ID = ITERATION.ITERATION_ID
)]"
I checked our database and the TEST_PLAN table only has one record in it, so I can't see how more than one row was returned by the subquery.
Does anyone have any ideas on how to fix this?
I'm running Squash on Fedora 42 and PostgreSQL 16.8.
Dernière modification par gemmalyly le lun. sept. 08, 2025 6:21 am, modifié 1 fois.