Play Framework DML insert script

跟風遠走 提交于 2019-12-25 03:37:51

问题


I am using Play Framework 2.3 with Slick and an in-memory H2 databse. When I start the application, I would like to not only create the database from the evolution script, but as well insert some default data. This topic doesen't seem to be covered in the Play documentation.


回答1:


It is possible to create a custom evolution script and place the DML in it. There is an activator template with this functionality – see the 2.sql file here.



来源:https://stackoverflow.com/questions/29571498/play-framework-dml-insert-script

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!