播放!:Slick的DDL取代了Evolutions吗? [英] Play!: Does Slick's DDL replace Evolutions?

查看:107
本文介绍了播放!:Slick的DDL取代了Evolutions吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这可能是一个愚蠢的问题,但我是Play的新手! &光滑在使用Slick的table.ddl.create时,我注意到它不会创建演化版本,但该应用程序仍然可以运行.

This may be a dumb question but I'm new to Play! & Slick. While using Slick's table.ddl.create I noticed that it doesn't create an evolution but the application still works.

这会取代进化吗?我可以在生产中使用它吗?我应该吗?

Does this replace evolutions? Can I use it in production? Should I?

提前谢谢.

推荐答案

Slick和Slick DDL插件只能生成代码来创建或删除您的架构,而不能对其进行演化.因此,您仍然需要Play演变或类似的东西来沿途修改现有架构.在Slick团队中,我们正在努力开发迁移解决方案(优先级较低).已经有很多部分,但尚未正确集成.有@nafg的架构操作DSL: https://github.com/nafg/slick-migration-api 和我一岁的数据库版本管理工具原型: https://github.com/cvogt/migrations/.后者的代码生成部分已经将其纳入Slick 2.0.适当地整合所有这些,将为我们提供类型安全的数据库迁移脚本的全面解决方案.

Both Slick and the Slick DDL Plugin can only generate code to create or delete your schema, not to evolve it. So you still need Play evolutions or something similar to modify an existing schema along the way. In the Slick team, we are working towards a migration solution (on a lower priority). Many parts are already there, but haven't been integrated properly yet. There are @nafg's schema manipulation DSL: https://github.com/nafg/slick-migration-api and my one year old prototype for a database version management tool: https://github.com/cvogt/migrations/ . The code generation part of the latter has already made it into Slick 2.0. Properly integrating all of these will give us a comprehensive solution for type-safe database migration scripts.

这篇关于播放!:Slick的DDL取代了Evolutions吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆