Rails迁移具有相同的名称 [英] Rails migrations with the same name

查看:129
本文介绍了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只抱怨迁移名称仅 。那么,迁移名称对其功能没有影响,因此您只需使用不同的名称。

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天全站免登陆