#34568: makemigrations --update changes the name of custom migration name
-------------------------------------+-------------------------------------
Reporter: David | Owner: nobody
Sanders |
Type: | Status: new
Uncategorized |
Component: Database | Version: 4.2
layer (models, ORM) |
Severity: Normal | Keywords:
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
This may be intentional behaviour but the docs don't mention this so
creating a ticket to update docs or correct behaviour:
If you create a migration with a custom name:
{{{
$ ./manage.py makemigrations --name foo
Migrations for 'update_rename':
update_rename/migrations/0001_foo.py
- Create model Foo
}}}
then running `--update` will change the name "foo" to the autogenerated
one based on the operations:
{{{
$ ./manage.py makemigrations --update
Migrations for 'update_rename':
update_rename/migrations/0001_initial.py
- Create model Foo
Deleted update_rename/migrations/0001_foo.py
}}}
My opinion is that it shouldn't as it violates the principle of least
astonishment ''even though the `--name` argument wasn't supplied''.
--
Ticket URL: <https://code.djangoproject.com/ticket/34568>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/0107018823f6a24d-e37aedec-67e9-4398-aef7-e55486194125-000000%40eu-central-1.amazonses.com.