简体   繁体   中英

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

In development Play automatically creates missing tables and indexes in my database, but it doesn't seem to want to do this in production - which makes it hard to set up my production database.

How do I do this?

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM