It looks like there are no foreign keys on any organization_ids (environments, etc). I'll open a redmine issue.