Kevin K
Kevin K

Reputation: 2227

How do I check which database my heroku app is using?

When listing the addons to my applications in Heroku, I see two postgresql databases for the same app:

heroku-postgresql:hobby-basic  boston-xxxx-7435          myapp            $9.00/month
heroku-postgresql:hobby-dev    xxxx-messy-4538           myapp            free

I got a notice saying that the dev database exceeded 10,000 rows, but I thought I upgraded to the basic level already.

How can I check to see which one I'm actually using? And if I'm already using the basic one as I suspect, do I have to drop the dev database?

Upvotes: 1

Views: 913

Answers (2)

K M Rakibul Islam
K M Rakibul Islam

Reputation: 34318

You can use:

heroku pg:info --app YourAppName

as Akshay mentioned in his answer to see the status of your databases on heroku.

If you got a notice saying that your database has exceeded 10,000 rows, that means you are no longer eligible for the free tier and you need to upgrade your database plan on heroku.

I have gone through the exact same situation as yours couple of years ago and I found this awesome gist which nicely explains how to upgrade your database plan on heroku safely i.e. taking proper data backup and at last deleting the old database.

Upvotes: 1

Akshay Borade
Akshay Borade

Reputation: 2472

Try this:

heroku pg:info --app YourAppName

Hope this will help you.

Upvotes: 3

Related Questions