他们是否有任何工具可以创建现有数据库的 Ruby on Rails 迁移脚本

发布于 2024-08-28 23:35:12 字数 103 浏览 3 评论 0原文

我想知道是否有任何工具可用于在 Ruby on Rails 中创建现有数据库的 SQL 迁移脚本?

另外,是否有任何可视化工具可用于编写 Ruby on Rails 迁移脚本?

I wanted to know if there is any tool that can be used to create SQL migration script of existing database in Ruby on Rails?

Also is there any visual tool that can be used to write Ruby on Rails migration script?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

无法回应 2024-09-04 23:35:12

您可以使用 rake 创建模式转储,这将允许您重新创建数据库。据我所知,没有创建迁移的可视化工具。

You can create a dump of the schema using rake, which will allow you to recreate your database . There isn't, AFAIK a visual tool to create migrations.

亚希 2024-09-04 23:35:12

我认为当已经有一个工作数据库时进行迁移的正确方法是创建一个新的迁移,然后手动放置从数据库服务器转储的模式,并添加另一行来导入现有数据。

当您创建新迁移时,3rd Rail 有一个内置工具。它有许多其他“向导”来执行常见的 Ruby 脚本任务。但我发现 IDE 本身太慢,尤其是在处理导入的项目时。

I think the correct way making a migration when already have a working database is to create a new migration, then manually put the schema dumped from db server, and add another line to import existing data.

3rd Rail has a builtin tool when you create a new migration. It has lots of other "wizards" for doing common ruby script tasks. But I found the IDE it self too slow especially when working on a imported project.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文