如何合并两个数据库与Heroku上的相同模式? [英] How to I merge two databases with same schema that are on Heroku?

查看:142
本文介绍了如何合并两个数据库与Heroku上的相同模式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了两个在heroku上基本相同的应用程序。他们开始与众不同,因为我正在测试上传到heroku,并在进行调整时遇到一些挑战。



但现在情况似乎有效,但两者都有我想要的数据以巩固。由于它们运行的​​是同一个git存储库,所以代码与迁移一样。



好像我需要将它合并到本地并合并,但不完全正确明确如何做到这一点。在谷歌上进行了一些搜索,没有任何明确的信息。



我想要一步一步的帮助,我没有一个明确的过程。 / p>

1)我有两个应用程序,在heroku上有数据库。它们具有相同的模式;

2)我不需要知道数据来自哪里:我只需要将它们全部驻留在单个数据库中



3)我希望能够使用特定的sql命令执行此操作,而不是手动打开(不知道该如何执行此操作),然后进行调整,因为存在大约10个不同的相关关系表格。



感谢! 决定手动选择正确的数据并重新输入,以便我可以进行一些错误检查 - 这是一种痛苦,但这种方法似乎没有简单的答案。注意自己:保持生产中的所有生产数据与试驾。


I created two applications that were essentially identical on heroku. They started off different because I was testing uploading to heroku and having some challenges making the adjustments.

But now things seem to be working, but both have data that I would like to consolidate. Since they run off the same git repository, the code is the same, as are the migrations.

Seems like I need to bring it down locally and merge, but not exactly clear how to do that. Did some searches on Google and nothing clear.

I'd like some help in terms of a step-by-step, I don't have a clear process.

1) I have two apps on heroku where I have the databases. They have the same schemas;

2) I don't need to know where the data came from: I just need it all to reside in a single database

3) I would like to be able to do it with specific sql commands, versus manually opening (not sure how I would do that) and then munging since there are about 10 different interrelated tables.

Thanks!

解决方案

Going to close this -- decided to just manually select the right data and re-enter it so I can do some error checking -- a pain but this approach doesn't seem to have an easy answer. Note to self: keep all production data in production versus test-driving.

这篇关于如何合并两个数据库与Heroku上的相同模式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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