tl;drIf you’re trying to delete a record with millions of dependent associated records and can’t rely on foreign keys, you also can’t rely on dependent: :destroy or even dependent: :delete_all.