* cc: Ian Bottomley (added)
--
Ticket URL: <https://code.djangoproject.com/ticket/31504#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* stage: Unreviewed => Accepted
Comment:
OK, this seems reasonable to me. (Others can shout if I missed something.
:)
--
Ticket URL: <https://code.djangoproject.com/ticket/31504#comment:2>
* owner: nobody => wtkm11
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/31504#comment:3>
Comment (by wtkm11):
I added the --skip-consistency-check flag to allow skipping the
inconsistent migration history check in the makemigrations command along
with a unit test in tests.migrations.test_commands::MakeMigrationsTests.
--
Ticket URL: <https://code.djangoproject.com/ticket/31504#comment:4>
* has_patch: 0 => 1
Comment:
https://github.com/django/django/pull/12796
--
Ticket URL: <https://code.djangoproject.com/ticket/31504#comment:5>
Comment (by Tom Forbes):
I've been thinking more about this - wouldn't it be preferable to
gracefully fail if the `check_consistent_history()` method fails due to a
connection error? Not sure what anyone else thinks, but your MR looks
simple enough. Just make sure you add something to the release notes +
documentation.
--
Ticket URL: <https://code.djangoproject.com/ticket/31504#comment:6>
* needs_better_patch: 0 => 1
Comment:
I agree with Tom, this is quite niche so I would also prefer to fail
gracefully. IMO we don't need a new option.
--
Ticket URL: <https://code.djangoproject.com/ticket/31504#comment:7>
Comment (by wtkm11):
I updated the PR so that a CommandError describing the error that was
encountered in check_consistent_history will be raised.
--
Ticket URL: <https://code.djangoproject.com/ticket/31504#comment:8>
* needs_better_patch: 1 => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/31504#comment:9>
Comment (by wtkm11):
I just updated the PR again so that a warning describing the error that
was encountered in check_consistent_history will be issued (and the
command will be able to continue).
--
Ticket URL: <https://code.djangoproject.com/ticket/31504#comment:10>
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/31504#comment:11>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"9756c334294ad573d887b449e2fe1cc87387af40" 9756c334]:
{{{
#!CommitTicketReference repository=""
revision="9756c334294ad573d887b449e2fe1cc87387af40"
Fixed #31504 -- Allowed calling makemigrations without an active database
connection.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/31504#comment:12>