Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#32865 closed Bug (invalid)

manage.py makemigrations command gives an unexpected issue in check_consistent_history.

Reported by: Samarth_Saxena Owned by: Samarth_Saxena
Component: Core (Management commands) Version: 3.2
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

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)

comment:1 by Mariusz Felisiak, 3 years ago

Resolution: invalid
Severity: Release blockerNormal
Status: assignedclosed
UI/UX: unset

A database file is not necessary, it's created automatically by makemigrations. Please use one of support channels.

comment:2 by Mariusz Felisiak, 3 years ago

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.
Note: See TracTickets for help on using tickets.
Back to Top