Created
July 12, 2020 15:23
-
-
Save rririanto/d1dad8c3767d3995387496a41979c785 to your computer and use it in GitHub Desktop.
django.db.utils.OperationalError: Problem installing fixtures: no such table: __old
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I use django 1.11.19 | |
Problem | |
django.db.utils.OperationalError: Problem installing fixtures: no such table: tour_city__old | |
Solved: | |
1. edited $ open yourvirtualenv/lib/python2.7/site-packages/django/db/backends/sqlite3/schema.py | |
2. add the line "c.execute('PRAGMA legacy_alter_table = ON')" after "c.execute('PRAGMA foreign_keys = 0')" | |
3. Delete the SQLite db | |
4. python manage.py migrate | |
3. python manage.py loaddata fixture.json |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment