 	LEFT JOIN document_config dc ON (c.id = dc.competition_id)
 	WHERE c.setup_complete = TRUE AND c.template = FALSE AND c.non_ifs = FALSE
 	AND ct.name != 'Expression of interest'
-	AND ct.name != 'The Prince''s Trust'
 	AND dc.competition_id IS NULL
 );
 

WHERE dc.title = 'Exploitation plan'
AND p.exploitation_plan_file_entry_id IS NOT NULL;

SET SQL_SAFE_UPDATES = 0;

-- If collaboration agreement and exploitation plan have been submitted then update project document status

UPDATE project_document

	LEFT JOIN document_config dc ON c.id = dc.competition_id
	WHERE c.setup_complete = TRUE AND c.template = FALSE AND c.non_ifs = FALSE
	AND ct.name != 'Expression of interest'
	AND dc.title = 'Collaboration agreement'
	AND NOT EXISTS (SELECT * FROM document_config dc WHERE dc.title != 'Collaboration agreement' AND dc.competition_id = c.id)
);
