我正在運行django 1.7 & python 2.7。django python - 關係不存在
在我的postgressql db中,我有一些剩餘的表。我現在認爲,在我升級到django 1.7之前,當我更改了很多表格的名稱時,剩餘表格已經過剩。剩餘表格名稱中沒有任何數據。
當我檢查了我的遷移並在我的項目中搜索剩餘表名並找不到引用之後,我刪除/刪除了表。
我能夠更新現有記錄並添加新記錄,但刪除表後,我無法刪除現有記錄。
現有的和正確的表名是core_namedetails
。這是存儲所有用戶名稱詳細信息的表格。
我在postgressql db中刪除的表是core_resume_name_details
。
這裏是我得到的錯誤,當我嘗試刪除從core_namedetails
記錄:
ProgrammingError at /resume_details/name_details/delete/251/
relation "core_resume_name_details" does not exist
LINE 1: DELETE FROM "core_resume_name_details" WHERE "core_resume_na...
^
Request Method: GET
Request URL: http://127.0.0.1:8000/resume_details/name_details/delete/251/
Django Version: 1.7.2
Exception Type: ProgrammingError
Exception Value:
relation "core_resume_name_details" does not exist
LINE 1: DELETE FROM "core_resume_name_details" WHERE "core_resume_na...
我已經運行makemigrations
和migrate
。沒有問題返回。
我已經搜索谷歌&所以,但沒有發現我的錯誤。
有沒有人有任何解決這個問題?
astrikovd,謝謝,但這是行不通的。 – user1261774