--
Ticket URL: <https://code.djangoproject.com/ticket/24919>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* cc: andrewgodwin (added)
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
Comment:
See [https://groups.google.com/d/msgid/django-
developers/CAFwN1urVVW3hOkuT2vdAbm5EVv4pVs7MEvM9ejBEejSorYCrAQ%40mail.gmail.com
discussion] and [https://github.com/django/django/pull/4729 PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/24919#comment:1>
* stage: Unreviewed => Accepted
* type: Uncategorized => New feature
* version: 1.8 => master
--
Ticket URL: <https://code.djangoproject.com/ticket/24919#comment:2>
Comment (by shaib):
#24481 is very closely related (essentially, the same mechanism should be
used to generate SQL statements. For #24481, they should be printed; here,
executed).
--
Ticket URL: <https://code.djangoproject.com/ticket/24919#comment:3>
* owner: nobody => andrewgodwin
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/24919#comment:4>
Comment (by andrewgodwin):
PR for this is up at https://github.com/django/django/pull/4986
--
Ticket URL: <https://code.djangoproject.com/ticket/24919#comment:5>
Comment (by Tim Graham <timograham@…>):
In [changeset:"04e69598de75550a9227bfac353ff5606b6cbe43" 04e69598]:
{{{
#!CommitTicketReference repository=""
revision="04e69598de75550a9227bfac353ff5606b6cbe43"
Refs #24919 -- Made test models serializable for migrations.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/24919#comment:6>
Comment (by Tim Graham <timograham@…>):
In [changeset:"b60375d4bbb848af7950379e2f35a1a65f7a2591" b60375d4]:
{{{
#!CommitTicketReference repository=""
revision="b60375d4bbb848af7950379e2f35a1a65f7a2591"
Fixed #25129 -- Made model instance defaults work with migrations (refs
#24919).
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/24919#comment:7>
* cc: cmawebsite@… (added)
--
Ticket URL: <https://code.djangoproject.com/ticket/24919#comment:8>
Comment (by MarkusH):
@andrewgodwin what's your thought about
https://github.com/django/django/pull/5255
--
Ticket URL: <https://code.djangoproject.com/ticket/24919#comment:9>
* keywords: => 1.9
* has_patch: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/24919#comment:10>
* needs_better_patch: 0 => 1
Comment:
Added some ideas for improvement to the PR.
As I mentioned in IRC, it could also be useful to allow the
`DATABASES['TEST']['MIGRATE'] = False` option that Andrew's first PR
suggested to be a shortcut for setting `MIGRATION_MODULES = {'a': None,
'b': None', ...}` for all apps. This could be done later or in a separate
commit though. The main concern I have with this idea is whether or not it
makes sense in a multi-db situation.
--
Ticket URL: <https://code.djangoproject.com/ticket/24919#comment:11>
* needs_better_patch: 1 => 0
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/24919#comment:12>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"a3c01b0dd8060f00a5ffd2589a776b4f618af6d9" a3c01b0]:
{{{
#!CommitTicketReference repository=""
revision="a3c01b0dd8060f00a5ffd2589a776b4f618af6d9"
Fixed #24919 -- Allowed disabling of migrations on a per app basis
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/24919#comment:13>
Comment (by Markus Holtermann <info@…>):
In [changeset:"f45ee1974696c8fc17ccfe12ef9e4188e29543a2" f45ee197]:
{{{
#!CommitTicketReference repository=""
revision="f45ee1974696c8fc17ccfe12ef9e4188e29543a2"
Refs #24919 -- Raised more helpful error message for disabled migrations
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/24919#comment:14>
Comment (by MarkusH):
Replying to [comment:11 timgraham]:
> Added some ideas for improvement to the PR.
>
> As I mentioned in IRC, it could also be useful to allow the
`DATABASES['TEST']['MIGRATE'] = False` option that Andrew's first PR
suggested to be a shortcut for setting `MIGRATION_MODULES = {'a': None,
'b': None', ...}` for all apps. This could be done later or in a separate
commit though. The main concern I have with this idea is whether or not it
makes sense in a multi-db situation.
I created #25388 to keep track of this proposal if somebody wants to work
on it.
--
Ticket URL: <https://code.djangoproject.com/ticket/24919#comment:15>
Comment (by Simon Charette <charette.s@…>):
In [changeset:"477274acb46b2f07666e9f84dea2e65ea6b63ad3" 477274ac]:
{{{
#!CommitTicketReference repository=""
revision="477274acb46b2f07666e9f84dea2e65ea6b63ad3"
Refs #24919 -- Used the documented way of disabling migrations per app.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/24919#comment:17>
Comment (by Simon Charette <charette.s@…>):
In [changeset:"4dcaa5871b70859952c6f9c437dfe1b5f10509f2" 4dcaa587]:
{{{
#!CommitTicketReference repository=""
revision="4dcaa5871b70859952c6f9c437dfe1b5f10509f2"
Fixed #26135 -- Adjusted the migration questioner's handling of disabled
apps.
This was causing an issue when calling the `migrate` command in a test
case with
the `available_apps` attribute pointing to an application with migrations
disabled using the `MIGRATION_MODULES` setting.
Thanks to Tim Graham for the review.
Refs #24919
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/24919#comment:16>
Comment (by Simon Charette <charette.s@…>):
In [changeset:"abdbf00815ae8f49247082528d02a3d0890785a9" abdbf00]:
{{{
#!CommitTicketReference repository=""
revision="abdbf00815ae8f49247082528d02a3d0890785a9"
[1.9.x] Fixed #26135 -- Adjusted the migration questioner's handling of
disabled apps.
This was causing an issue when calling the `migrate` command in a test
case with
the `available_apps` attribute pointing to an application with migrations
disabled using the `MIGRATION_MODULES` setting.
Thanks to Tim Graham for the review.
Refs #24919
Backport of 4dcaa5871b70859952c6f9c437dfe1b5f10509f2 from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/24919#comment:18>
Comment (by Simon Charette <charette.s@…>):
In [changeset:"645fddcd4ee6adaa619b90404b85ccc8d9c316d8" 645fddcd]:
{{{
#!CommitTicketReference repository=""
revision="645fddcd4ee6adaa619b90404b85ccc8d9c316d8"
[1.9.x] Refs #24919 -- Used the documented way of disabling migrations per
app.
Backport of 477274acb46b2f07666e9f84dea2e65ea6b63ad3 from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/24919#comment:19>