开发者

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

开发者 https://www.devze.com 2023-02-08 07:58 出处:网络
In development Play automatically creates missing tables and index开发者_开发知识库es in my database, but it doesn\'t seem to want to do this in production - which makes it hard to set up my productio

In development Play automatically creates missing tables and index开发者_开发知识库es 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消