簡體   English   中英

使用Play Framework 1.x,如何讓JPA在生產模式下創建缺少的數據庫表?

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

在開發中,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

更新將完成工作,但要小心。 如果添加列或表,它可以正常工作,但不能更多。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM