玩!:Slick 的 DDL 会取代 Evolutions 吗? [英] Play!: Does Slick's DDL replace Evolutions?

查看:31
本文介绍了玩!: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天全站免登陆