I accidentally deleted my migrations. I later makemigrations
and migrate
but when I access certain parts of the app that have ForeignKey
references
, I get cursor "_django_curs_1696_sync_2" does not exist
. How on earth would I go about getting this corrected. This is happening in development and so I fear pushing to production because the same error will arise.?
I tried looking at similar questions but couldn't get one to help solve my problem.
Asked
Active
Viewed 305 times
1

fakeMake
- 738
- 8
- 18
1 Answers
1
The simplest solution to this problem
- Delete All files in all app migration folder (Except _ _ init _ _ .py)
- If use Docker Delete DB Volumes, Else Delete Your DB
- ReCreate the Database
- Run
$Python manage.py makemigrations
- Run
$Python manage.py migrate
- Enjoy IT

saelozahra
- 99
- 1
- 5