同名的 Rails 迁移 [英] Rails migrations with the same name

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

问题描述

人们如何优雅地处理这个问题?

How do people cope with this problem elegantly?

我有一个创建表的迁移,然后另一个删除该表,现在我想重新引入它,问题是我不能,因为它们具有相同的名称.

I had a migration that created a table, then another to remove that table, now I want to re-introduce it, problem is i cant as they have the same name.

推荐答案

如果我理解正确,Rails 只会抱怨迁移名称​​only.好吧,迁移名称对其功能没有影响,因此您可以使用其他名称.

If I understand you correctly, Rails complains only about migration name only. Well, migration name has no affect on its functionality, so you can just use a different one.

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

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