Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Play app on Heroku using shared database and model updates

I'm toying with a Play 1.2.3 application (Java) using a Heroku instance with a shared database.

My question is: how to update the database schema once the application is deployed? In fact, how to even initialize the database, as it is empty initially and Hibernate ddl in PROD mode is disabled?

On the options I've tried:

  1. Hibernate ddl auto is a big no-no in production
  2. Play Evolutions are a mess if you use Hibernate, they are giving me too many problems during development to use them or rely on them
  3. Heroku shared databases (the free option or the 20gb option) don't provide a Psql console access so you can't do it manually via scripts (as I would like)

This is an issue as the cost difference between the free db (15$/month) and the cheapest option that gives Psql access (200$/month) is huge, and for a bootstrapped "testing-the-waters" site it matters.

Any of you having this problem? How are you solving it?

like image 840
Pere Villega Avatar asked Feb 05 '26 08:02

Pere Villega


1 Answers

I use this one: https://github.com/ddollar/heroku-sql-console. It simply gives you an SQL console in your setup - I did not try to execute scripts.

like image 101
Joerg Viola Avatar answered Feb 07 '26 20:02

Joerg Viola



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!