[Django] #25944: Allow to tunnel migration to specific app

12 views
Skip to first unread message

Django

unread,
Dec 15, 2015, 5:53:45 PM12/15/15
to django-...@googlegroups.com
#25944: Allow to tunnel migration to specific app
-----------------------------+--------------------
Reporter: RamezIssac | Owner: nobody
Type: New feature | Status: new
Component: Migrations | Version: 1.8
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------+--------------------
Use case:
A third party app allow for "dynamic model loading" (where you can specify
one of its base model via something like `THIRD_PARTY_BASE_MODEL =
'myapp.CustomBase' ` in settings.py)
Then, when running `makemigrations` the migration file goes to the 3rd
party migrations folder (probably in the virtualenv) and unless manual
care taken to copy the migration file to the main app, renaming etc. , it
will lead to a complicated situation.

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

Django

unread,
Dec 15, 2015, 5:56:42 PM12/15/15
to django-...@googlegroups.com
#25944: Allow to tunnel migration to specific app
-----------------------------+--------------------------------------

Reporter: RamezIssac | Owner: nobody
Type: New feature | Status: new
Component: Migrations | Version: 1.8
Severity: Normal | Resolution:
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 timgraham):

* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0


Comment:

I think you might have an incorrect word choice in "tunnel" -- not sure
what that means in this context. Can you describe what the feature would
look like?

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

Django

unread,
Dec 15, 2015, 6:30:15 PM12/15/15
to django-...@googlegroups.com
#25944: Allow to tunnel migration to specific app
-----------------------------+--------------------------------------

Reporter: RamezIssac | Owner: nobody
Type: New feature | Status: new
Component: Migrations | Version: 1.8
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-----------------------------+--------------------------------------

Comment (by RamezIssac):

Thanks and excuse my English :)
I meant is "Put the newly created migration file in a specified app
migrations folder instead of its 'normal' place"

So, for example, i can write something like ``makemigrations --to-
app=myapp`` so the output 0002_auto_something.py file goes to
myapp/migrations, instead of thirdparty_package/migrations

--
Ticket URL: <https://code.djangoproject.com/ticket/25944#comment:2>

Django

unread,
Dec 15, 2015, 7:37:05 PM12/15/15
to django-...@googlegroups.com
#25944: Add the ability to specify which app a migration should be created in
-----------------------------+--------------------------------------

Reporter: RamezIssac | Owner: nobody
Type: New feature | Status: new
Component: Migrations | Version: 1.8
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-----------------------------+--------------------------------------

Comment (by timgraham):

A similar idea was [https://groups.google.com/d/topic/django-
developers/IG5ZSRRp8Rw/discussion discussed at some length] on django-
developers. I think the consensus was to use `MIGRATION_MODULES` to solve
this case, but feel free to take a look and add your thoughts.

--
Ticket URL: <https://code.djangoproject.com/ticket/25944#comment:3>

Django

unread,
Dec 15, 2015, 8:54:57 PM12/15/15
to django-...@googlegroups.com
#25944: Add the ability to specify which app a migration should be created in
-----------------------------+--------------------------------------
Reporter: RamezIssac | Owner: nobody
Type: New feature | Status: new
Component: Migrations | Version: 1.8
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-----------------------------+--------------------------------------

Comment (by RamezIssac):

Ooh dear Tim, thank you for pointing this conversation out.
I withdraw.. `MIGRATION_MODULES` it is...

--
Ticket URL: <https://code.djangoproject.com/ticket/25944#comment:4>

Django

unread,
Dec 15, 2015, 9:18:53 PM12/15/15
to django-...@googlegroups.com
#25944: Add the ability to specify which app a migration should be created in
-----------------------------+--------------------------------------
Reporter: RamezIssac | Owner: nobody
Type: New feature | Status: closed
Component: Migrations | Version: 1.8
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 timgraham):

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


--
Ticket URL: <https://code.djangoproject.com/ticket/25944#comment:5>

Reply all
Reply to author
Forward
0 new messages