Liquibase Grails数据库迁移 [英] Liquibase Grails database migrations

查看:108
本文介绍了Liquibase Grails数据库迁移的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遵循了
上的优秀教程 http://www.jakusys.de/blog/2008/09/grails-and-liquibase-how-to-use/



关于我的dev数据库安装grails的本地机器上。



现在我想将grails war部署到远程网站,我在远程服务器上设置mysql。

<但我现在处于亏损状态。如何应用命令:
grails migrate



,以便远程数据库具有DATABASECHANGELOG表。

在数据库中有一些生产数据,我将手动从本地mysql复制到远程mysql数据库的全新安装,而其他大多数表都是新鲜的,没有数据。我等待回答这个问题,以确保在远程生产服务器上实际启动我的grails应用程序之前,我不会搞砸一些东西。

您可以使用 grails.env 变量从您的计算机迁移远程数据库,如:

  grails migrate -Dgrails.env =生产


I followed the excellent tutorial on http://www.jakusys.de/blog/2008/09/grails-and-liquibase-how-to-use/

in regard to my dev database on local machine where grails is installed. All went well.

Now I want to deploy grails war to remote website where I setup mysql on remote server.

But I am at loss now. How do I apply the command: grails migrate

so that the now the remote database has the DATABASECHANGELOG table.

In the database there is some production data that I will manually copy from my local mysql to fresh install of remote mysql database while most of other tables are fresh and have no data. I am waiting for reply to this question to make sure I don't mess up something before actually launch my grails application on remote production server.

解决方案

You can migrate a remote DB from your computer, using grails.env variable, like:

grails migrate -Dgrails.env=production

这篇关于Liquibase Grails数据库迁移的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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