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