Follow up: Existing deployments do not belong to any environments
In Edge case: Existing deployments do not belong to any environments. it was discovered that there is data to be cleaned up on gitlab.com. The cleanup will be handled on that issue.
This issue has been created to check if the problem re-occurs after the fix has been put in place, and should be scheduled,
Steps to reproduce
Run this query against and ensure there are no new orphaned rows. If there are it needs further investigation, otherwise this issue can be closed.