diff --git a/src/backend/migrations/archived/2024-08-09/002-add-xforms-table.sql b/src/backend/migrations/archived/2024-08-09/002-add-xforms-table.sql index ccb41dfa2e..fe11ecf7f3 100644 --- a/src/backend/migrations/archived/2024-08-09/002-add-xforms-table.sql +++ b/src/backend/migrations/archived/2024-08-09/002-add-xforms-table.sql @@ -70,14 +70,19 @@ SET FROM public.tasks WHERE NOT EXISTS ( - SELECT 1 FROM public.projects WHERE odk_token IS NOT NULL + SELECT 1 FROM public.projects + WHERE odk_token IS NOT NULL ) LIMIT 1 ) WHERE id = ( SELECT id FROM public.projects - WHERE NOT EXISTS (SELECT 1 FROM public.projects WHERE odk_token IS NOT NULL) + WHERE + NOT EXISTS ( + SELECT 1 FROM public.projects + WHERE odk_token IS NOT NULL + ) LIMIT 1 );