ruby-on-rails - 回滚特定迁移而不回滚其他迁移

标签 ruby-on-rails database command-line migration

我错误地运行了倒数第二个数据库迁移错误,但最后一个迁移没问题。现在我想回滚倒数第二个迁移而不还原上一个迁移。请与我和其他人分享您的知识。

最佳答案

您可以使用 rake db:migrate:down VERSION=xxxxx 其中 xxx 是您的迁移版本号以获得更多 see this

关于ruby-on-rails - 回滚特定迁移而不回滚其他迁移,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23467989/

相关文章:

ruby-on-rails - 使用 Rack::Deflater 时,rails 中的 HTTP 流不起作用

javascript - sequelize.literal 返回原属性名称和重命名后的属性

c++ - GNU MAKE - 从我自己的 Makefile 创建 getoptpp 库或为 c++ 建议命令行选项库

sql - 哪些第三方工具/库可用于 NoSQL 数据库?

php - 从 php 脚本执行 linux 命令

command-line - 纯提示安装问题

ruby-on-rails - rake 分贝 :migrate syntax error when trying to do migration

ruby-on-rails - 如何根据 Gemfile 的更改重新同步 Gemfile.lock

ruby-on-rails - Rails : returning records for which a relationship does not exist

database - 用于 sqlserver2008 的 schemaSpy?