playframework-evolutions

Play framework and Slick automatic database creation

故事扮演 提交于 2019-12-05 01:53:27
问题 I'm using play 2.4 and Slick 3, Is it possible to generate automatically ddl scripts, it is evolutions? In official docs I found some scripts, but where should I place it in play framework? http://slick.typesafe.com/doc/3.1.0/schemas.html Do you know any libs to manage evolutions in code to not write plain SQL? 回答1: I made some workaround with PostgresDriver, I've created module, that prints DDL to file. After every code change I just need to replace 1.sql or later modify next evolution

Play Framework 2.1.1 Deployment Issues

匆匆过客 提交于 2019-12-04 23:40:10
问题 So, I'm trying to deploy my very simple Play Framework 2.1.1 app but whenever I pass flags through the command line for port and to apply database evolutions, they are ignored. For example: sudo play start -Dhttp.port=80 -DapplyEvolutions.default=true Using this command, the server will not start. Both the port and applyEvolutions=true flags are ignored completely and it throws this error: [warn] play - Your production database [default] needs evolutions! [warn] play - Run with

How to apply manually evolutions in tests with Slick and Play! 2.4

白昼怎懂夜的黑 提交于 2019-12-04 02:33:05
I would like to manually run my evolution script at the beginning of each test file. I'm working with Play! 2.4 and Slick 3. According to the documentation, the way to go seems to be: Evolutions.applyEvolutions(database) but I don't manage to get an instance of my database. In the documentation play

Rolling an evolution back

旧城冷巷雨未停 提交于 2019-12-03 22:24:41
This question might seem stupid, but I cannot find any instruction on how to roll back an evolution in Play 2.0. Google only finds pages which say that the "Downs" section of an evolution file is used for that and that's all. Any pointers or instructions will be appreciated. The Downs part is mainly

How to handle Play Framework 2 database evolutions in production

僤鯓⒐⒋嵵緔 提交于 2019-11-27 00:31:36
问题 It seems that whenever I change my models, Play Framework asks me to run a script that deletes my entire schema and recreates it. Obviously this won't work for production, so what is the proper way to handle this in production? Note, I'm using ebean and Postgres, and hosting on heroku. 回答1: Unfortunately Ebean can create only CREATE DDL (and not UPDATE DDL ) (as answered on their group), therefore you need to switch to manual evolutions ASAP. some rules: Always backup your live DB before

工具导航Map

JSON相关