Using Play Framework 1.x, how do I get JPA to create missing database tables in production mode?

In development, Play automatically creates missing tables and indexes in my database, but it seems that it does not want to do this in production, which makes it difficult to set up my production database.

How to do it?

+3
source share
1 answer

You must configure it in application.conf

# Specify the ddl generation pattern to use. Set to none to disable it 
# (default to update in DEV mode, and none in PROD mode):
# jpa.ddl=update

the update will do the job, but be careful. It works great if you add a column or table, but no more.

+5
source

Source: https://habr.com/ru/post/1789540/


All Articles