Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Reason for change:
.
(dot)(excluding the .py extension)Description:
.
then the name of the migration file would be00X_constraint_.name.py
.00X_constraint_.name.py
, which the migrate/showmigrations considers as a nonpython file because of.name.py
as an extension. So everytime we run makemigrations it would just create a new migrations file. Migrate/ Showmigrations donot find the file as it is not recognized as.py
file..
contained in the file name,migrate /showmigrations
is then able to find the new migration files. This makes sure that even though there are any.
(dot) in migration file name, it would get replaced andmigrate/showmigrations
would be able to find the file.Or maybe we can do
self.migration.name.replace(".", "_").replace(" ", "_")
for proper naming of migration files at line number 274 of django.db.migrations.writer.py file.This pull request is also linked to the ticket: https://code.djangoproject.com/ticket/34050#ticket
Regards,
Bishal Gautam