我想在我的rails 4 app中使用mailboxer.当我尝试部署数据库时出现问题.创建邮箱会话表时出错,该表在通知表中具有依赖关系.
我正在尝试删除通知对话的外键.
我创建了一个迁移说:
change_table :notifications do |t| t.remove_foreign_key :conversations
但是,rake中止并说外键不存在.
rake aborted! An error has occurred, this and all later migrations canceled: PG::UndefinedObject: ERROR: constraint "notifications_conversation_id_fk" of relation "notifications" does not exist
我的架构包括:add_foreign_key"notifications","conversation",name:"notifications_on_conversation_id"
我试图挖掘db:migrate:down创建邮箱的原始迁移,但也收到错误,说'找不到命令'.
有人可以帮忙吗?谢谢.