0
我有代码在迁移过程中已被注释掉,但是当我运行代码仍然尝试运行迁移时,该代码已被注释掉。 它提供了以下错误:迁移仍然在代码被注释掉时运行代码
error is PG::Error: ERROR: column "rount_id" of relation "rounds" does not exist
上述错误就是为什么它已被注释掉的原因。
def up
remove_column :rounds, :rount_id
end
def down
add_column :rounds, :rount_id, :integer
end
你可以添加相应的迁移文件吗? –
#def了 ## remove_column:轮,:rount_id #结束 #def下来 #add_column:轮,:rount_id,:整数 #结束 – maggs
你确定你保存你的迁移评论出来后?你是否也确定这个错误是由上面的迁移引发的?你不能编辑你的问题吗? – BroiSatse