manage.py makemigrations command gives an unexpected issue in check_consistent_history.
When I first create a project (even if you delete all the migration and database files), and you run python manage.py makemigrations, it gives you the following error:
C:\Users\samar\AppData\Local\Programs\Python\Python39\Lib\site-packages\django\core\management\commands\makemigrations.py: 105: RuntimeWarning: Got an error checking a consistent migration history performed for database connection default: Unable to open database file. Warnings.Warn(...)
This isn't its usual behavior as I don't have a database file and I'm working with SQLite3 and have some models in some of my apps and no migrations, so it should ideally create the database file and the migration files for me to be able to migrate into the database with manage.py migrate. However, on top throwing this warning, it doesn't create the migration files or the database file. If it helps, my code is on GitHub at http://github.com/samarth466/∴ess.git.
Change History
(2)
Resolution: |
→ invalid
|
Severity: |
Release blocker → Normal
|
Status: |
assigned → closed
|
UI/UX: |
unset
|
Summary: |
When running manage.py makemigrations command, it gives an unexpected issue in check_consistent_history. → manage.py makemigrations command gives an unexpected issue in check_consistent_history.
|
A database file is not necessary, it's created automatically by
makemigrations
. Please use one of support channels.