Can I tell if an app is attached to a db?

Hi, I’m trying to support Fly.io in a tool that automates Django deployment. I can list a user’s apps with fly apps list, and list their dbs with fly postgres list.

Is there a way to tell if one of the existing dbs is already attached to the app that’s being targeted?