Java 使用PlayFramework1.x,如何让JPA在生产模式下创建缺少的DB表?
在开发中,Play会自动在我的数据库中创建缺失的表和索引,但它似乎不想在生产中这样做,这使得设置生产数据库变得很困难Java 使用PlayFramework1.x,如何让JPA在生产模式下创建缺少的DB表?,java,jpa,playframework,Java,Jpa,Playframework,在开发中,Play会自动在我的数据库中创建缺失的表和索引,但它似乎不想在生产中这样做,这使得设置生产数据库变得很困难 如何执行此操作?您必须在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 更新可以完成任
如何执行此操作?您必须在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
更新可以完成任务,但要小心。如果您添加一个列或表,它可以正常工作,但不能更多。Nice,我根本不知道这是受支持的!