我们如何在Grails中迁移/更新数据库模式? [英] How do we migrate/update the database schema in Grails?

查看:117
本文介绍了我们如何在Grails中迁移/更新数据库模式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们一直在与Grails合作一段时间,我的团队主管提出了关于Grails ORM(GORM)的一些问题:


  1. 我们如何在移植到产品后维护数据库模式?

  2. 我们可以使用Grails更新数据库模式吗?

  3. 如果模式已更新,这些更改是否会自动反映/框架是否处理此问题?

  4. 有没有Grails的插件可以让我们无需头痛地更新架构?


解决方案

我最近发布了数据库迁移的官方Grails插件 - 请参阅 http://grails.org/plugin/database-migration 以及 http://grails-plugins.github.com/grails-database-migration/docs/manual/index.html



I' m与Liquibase的作者就此合作,因此旧版liquibase插件现已弃用,因为它使用最新版本的Liquibase(2.0)并由SpringSource正式支持,所以应该使用新插件。请参阅 http://blog.liquibase。 org / 2011/01 / new-standard-liquibase-plugin-grails-database-migration.html

在Grails上提出使用问题用户邮件列表(从 http://grails.org/Mailing+lists 注册)或新的插件论坛在 http://grails-plugins.847840.n3.nabble.com/ 或直接给作者发电子邮件:)

We've been working with Grails for a while and my Team Lead raised some questions about the Grails ORM (GORM):

  1. How do we maintain the database schema once we have moved to production?
  2. Can we update the database schema with Grails?
  3. If the schema is updated, will the changes be automatically reflected / does the framework take care of this?
  4. Is there any plugin for Grails that will allow us to update the schema without headaches?

解决方案

I recently released the official Grails plugin for database migrations - see http://grails.org/plugin/database-migration and the docs at http://grails-plugins.github.com/grails-database-migration/docs/manual/index.html

I'm working with the author of Liquibase on this, so the older liquibase plugin is now deprecated and the new one should be used since it uses the latest version of Liquibase (2.0) and is officially supported by SpringSource. See http://blog.liquibase.org/2011/01/new-standard-liquibase-plugin-grails-database-migration.html for his announcement.

Ask usage questions on the Grails User mailing list (signup from http://grails.org/Mailing+lists) or the new plugin forum at http://grails-plugins.847840.n3.nabble.com/ or email the author directly :)

这篇关于我们如何在Grails中迁移/更新数据库模式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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