[Django] #32387: More efficiant migration management

8 views
Skip to first unread message

Django

unread,
Jan 26, 2021, 2:25:56 PM1/26/21
to django-...@googlegroups.com
#32387: More efficiant migration management
---------------------------------------+------------------------
Reporter: francois90 | Owner: nobody
Type: New feature | Status: new
Component: Migrations | Version: 3.1
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
---------------------------------------+------------------------
This idea may be bad for reasons that i am not seeing, but it seems to me
like it would be possible to have two types of migrations, the ones that
are committed and the ones that aren't. This way, it would be possible to
have a deployment script that deletes all uncommitted migrations, runs
makemigrations in order to recreate them in one batch, commit the newly
created migrations and deploy. This would have the benefit of keeping
everyone on the same page regarding migrations that are in production
while reducing the number of migrations and minimizing the chances of
conflicts.

The way i envision implementing this is by simply giving a different name
to uncommitted migrations so they can be put in .gitignore. It could be
done by adding a setting for configuring a custom string to add at the end
of newly created migrations.

Please anyone let me know if this is a bad idea or if there is a better
way to implement it.

Cheers

--
Ticket URL: <https://code.djangoproject.com/ticket/32387>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jan 26, 2021, 2:45:38 PM1/26/21
to django-...@googlegroups.com
#32387: More efficiant migration management
-----------------------------+--------------------------------------
Reporter: francois90 | Owner: nobody
Type: New feature | Status: closed
Component: Migrations | Version: 3.1
Severity: Normal | Resolution: wontfix

Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------+--------------------------------------
Changes (by Mariusz Felisiak):

* status: new => closed
* resolution: => wontfix


Comment:

Thanks for this proposition, however I don't see why you need a special
built-in workflow to do this. `makemigrations` already supports the
`--name` option, so you can name uncommitted migrations in a different way
and do this exactly as described. Most of this flow is outside of Django.
I don't see a reason to add a new option and especially encourage it.

--
Ticket URL: <https://code.djangoproject.com/ticket/32387#comment:1>

Reply all
Reply to author
Forward
0 new messages