Play!: Does Slick's DDL replace Evolutions?

后端 未结 2 1565
有刺的猬
有刺的猬 2021-01-07 22:56

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 appl

2条回答
  •  我在风中等你
    2021-01-07 23:39

    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.

提交回复
热议问题