开发者

In Play Framework, how and when are changes to models synchronized with the DB schema?

开发者 https://www.devze.com 2023-02-07 04:24 出处:网络
In the Play Framework, when i add or modify a model, when is the update made to the database schema?is this done automatica开发者_开发问答lly, or do i need to initiate it manually somehow?If your are

In the Play Framework, when i add or modify a model, when is the update made to the database schema? is this done automatica开发者_开发问答lly, or do i need to initiate it manually somehow?


If your are running in Dev mode, then it is done immediately. The definition of immediately is when a server request is next invoked, the update check is made and this kicks off the process for recompiling your Java classes, and as a result the database schema also.

If it is in Prod mode, then it is when the server starts.

0

精彩评论

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

关注公众号