diff --git a/app/services/data/tear-down/water-schema.service.js b/app/services/data/tear-down/water-schema.service.js index 0eedf402ac..7bfdabdf9a 100644 --- a/app/services/data/tear-down/water-schema.service.js +++ b/app/services/data/tear-down/water-schema.service.js @@ -170,6 +170,14 @@ async function _deleteAllTestData () { WHERE "is_test" = TRUE; + DELETE + FROM + "water"."licence_agreements" AS "la" + USING "water"."licences" AS "l" + WHERE + "l"."is_test" = TRUE + AND "la"."licence_ref" = "l"."licence_ref"; + DELETE FROM "water"."financial_agreement_types"