--
Ticket URL: <https://code.djangoproject.com/ticket/22170>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* owner: => andrewgodwin
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/22170#comment:1>
* status: assigned => new
* owner: andrewgodwin =>
* severity: Release blocker => Normal
* stage: Unreviewed => Accepted
Comment:
I've had a go at this, and it's just too much to do before 1.7, and I
don't consider it a release blocker.
The main problem is the test suite; it heavily relies on some intricate
behaviours of the way models are created and the ordering of that, and
migrations changes just enough that large swathes of it fail. I've
attached the patch of my work so far for future reference when we come
back to this.
--
Ticket URL: <https://code.djangoproject.com/ticket/22170#comment:2>
* has_patch: 0 => 1
Comment:
Tests pass, at least with SQLite and PostgreSQL. Main difficulty was to
have the auth tests run the migration for various custom user models.
https://github.com/django/django/pull/2590
--
Ticket URL: <https://code.djangoproject.com/ticket/22170#comment:3>
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/22170#comment:4>
* needs_better_patch: 0 => 1
* stage: Ready for checkin => Accepted
Comment:
Back to accepted:
* Loïc suggested a workaround to the `initial.py` vs `0001_initial.py`
naming issue in auth.
* I must have forgotten to include the sessions migration
* A more serious issue I discovered is about the `auth` and
`MIGRATION_MODULES` hack in `runtests.py`:
if we include the `MIGRATION_MODULES` hack in `runtests.py` and don't
include `django.contrib.auth` in tested labels, the creation of the test
database fails because the `flush` command fails (`auth_customuser` table
missing).
--
Ticket URL: <https://code.djangoproject.com/ticket/22170#comment:5>
Comment (by claudep):
I find the `auth` migration really hard to do right, if anyone feels like
doing it, please go ahead. I think it could be done independently of other
migrations. The difficulty lies in having two sets of migrations (one with
custom user for tests and one "normal") and playing nicely with
`runtests.py`, `migrate` and `flush`.
--
Ticket URL: <https://code.djangoproject.com/ticket/22170#comment:6>
Comment (by Tim Graham <timograham@…>):
In [changeset:"ec6e2eac60be52f7a5979ebc29a64197f5a11174"]:
{{{
#!CommitTicketReference repository=""
revision="ec6e2eac60be52f7a5979ebc29a64197f5a11174"
Added database migration for contrib.sites.
refs #22170.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/22170#comment:7>
Comment (by Tim Graham <timograham@…>):
In [changeset:"7da16b99dfa72beb782467d3644467457e1c6145"]:
{{{
#!CommitTicketReference repository=""
revision="7da16b99dfa72beb782467d3644467457e1c6145"
Added database migration for contrib.flatpages.
refs #22170.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/22170#comment:8>
Comment (by Tim Graham <timograham@…>):
In [changeset:"d7576bb27ad2825814ed9909271d3f64cb0e2bc4"]:
{{{
#!CommitTicketReference repository=""
revision="d7576bb27ad2825814ed9909271d3f64cb0e2bc4"
Added database migration for contrib.redirects.
refs #22170.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/22170#comment:9>
Comment (by Tim Graham <timograham@…>):
In [changeset:"534d9f1e822ef49550c195a4e9493970781c4591"]:
{{{
#!CommitTicketReference repository=""
revision="534d9f1e822ef49550c195a4e9493970781c4591"
[1.7.x] Added database migration for contrib.sites.
refs #22170.
Backport of ec6e2eac60 from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/22170#comment:10>
Comment (by Tim Graham <timograham@…>):
In [changeset:"380cafe5bee50d4cc9d90ef6e33e47be9de25e0b"]:
{{{
#!CommitTicketReference repository=""
revision="380cafe5bee50d4cc9d90ef6e33e47be9de25e0b"
[1.7.x] Added database migration for contrib.redirects.
refs #22170.
Backport of d7576bb27a from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/22170#comment:12>
Comment (by Tim Graham <timograham@…>):
In [changeset:"ec7cddd361c7e575397e067c5f0e0846c11a0b10"]:
{{{
#!CommitTicketReference repository=""
revision="ec7cddd361c7e575397e067c5f0e0846c11a0b10"
[1.7.x] Added database migration for contrib.flatpages.
refs #22170.
Backport of 7da16b99df from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/22170#comment:11>
Comment (by Tim Graham <timograham@…>):
In [changeset:"37a8f5aeedcfc5b4605960e5dc3d989456ce88b9"]:
{{{
#!CommitTicketReference repository=""
revision="37a8f5aeedcfc5b4605960e5dc3d989456ce88b9"
Added database migration for contrib.sessions.
refs #22170.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/22170#comment:13>
Comment (by Tim Graham <timograham@…>):
In [changeset:"a15bf2cd4e8f7279488f04aaf3040f420dc5f9cb"]:
{{{
#!CommitTicketReference repository=""
revision="a15bf2cd4e8f7279488f04aaf3040f420dc5f9cb"
[1.7.x] Added database migration for contrib.sessions.
refs #22170.
Backport of 37a8f5aeed from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/22170#comment:14>
Comment (by Tim Graham <timograham@…>):
In [changeset:"eb8600a65673649ea15ed18d17127f741807ac8b"]:
{{{
#!CommitTicketReference repository=""
revision="eb8600a65673649ea15ed18d17127f741807ac8b"
Added database migration for contrib.contenttypes.
Moved contenttypes tests to allow them to run correctly in the presence of
migrations. refs #22170.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/22170#comment:15>
Comment (by Tim Graham <timograham@…>):
In [changeset:"a0bf14a2accb75987657a9656bccfc8b9df8d375"]:
{{{
#!CommitTicketReference repository=""
revision="a0bf14a2accb75987657a9656bccfc8b9df8d375"
[1.7.x] Added database migration for contrib.contenttypes.
Moved contenttypes tests to allow them to run correctly in the presence of
migrations. refs #22170.
Backport of eb8600a656 from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/22170#comment:16>
Comment (by Tim Graham <timograham@…>):
In [changeset:"b341f33697cdd26cc967c2ca4a0ac679f4167319"]:
{{{
#!CommitTicketReference repository=""
revision="b341f33697cdd26cc967c2ca4a0ac679f4167319"
Added database migration for contrib.auth.
refs #22170.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/22170#comment:17>
Comment (by Tim Graham <timograham@…>):
In [changeset:"d36b54d753a1fb79f32f6b7a91d582bccb7ab311"]:
{{{
#!CommitTicketReference repository=""
revision="d36b54d753a1fb79f32f6b7a91d582bccb7ab311"
[1.7.x] Added database migration for contrib.auth.
refs #22170.
Backport of b341f33697 from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/22170#comment:18>
* status: new => closed
* resolution: => fixed
Comment:
Initial migrations have now been added for all contrib apps (except
deprecated comments).
--
Ticket URL: <https://code.djangoproject.com/ticket/22170#comment:19>