Re: [Django] #23410: Backward migrations change overall state rather than reverting single migration

2014-11-19 Thread Django
#23410: Backward migrations change overall state rather than reverting single
migration
-+-
 Reporter:  Markush2010  |Owner:  nobody
 Type:  New feature  |   Status:  closed
Component:  Migrations   |  Version:  1.7
 Severity:  Normal   |   Resolution:  fixed
 Keywords:   | Triage Stage:  Ready for checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Carl Meyer ):

 In [changeset:"03e8c182888e27c7609cbc7705a46ab7b7107f12"]:
 {{{
 #!CommitTicketReference repository=""
 revision="03e8c182888e27c7609cbc7705a46ab7b7107f12"
 [1.7.x] Fixed #23410 -- Avoided unnecessary rollbacks in related apps when
 migrating backwards.

 Backport of ab2819aa7b09d36d9ff24830a9825aa52b87fdb4 from master.
 }}}

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/069.9b6f6fc0417f905d464e7fb7b44dfc2f%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23410: Backward migrations change overall state rather than reverting single migration

2014-11-19 Thread Django
#23410: Backward migrations change overall state rather than reverting single
migration
-+-
 Reporter:  Markush2010  |Owner:  nobody
 Type:  New feature  |   Status:  closed
Component:  Migrations   |  Version:  1.7
 Severity:  Normal   |   Resolution:  fixed
 Keywords:   | Triage Stage:  Ready for checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Carl Meyer ):

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


Comment:

 In [changeset:"ab2819aa7b09d36d9ff24830a9825aa52b87fdb4"]:
 {{{
 #!CommitTicketReference repository=""
 revision="ab2819aa7b09d36d9ff24830a9825aa52b87fdb4"
 Fixed #23410 -- Avoided unnecessary rollbacks in related apps when
 migrating backwards.
 }}}

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/069.5ddd90821e968d9f4ded84d9607a499e%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23410: Backward migrations change overall state rather than reverting single migration

2014-11-17 Thread Django
#23410: Backward migrations change overall state rather than reverting single
migration
-+-
 Reporter:  Markush2010  |Owner:  nobody
 Type:  New feature  |   Status:  new
Component:  Migrations   |  Version:  1.7
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Ready for checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by timgraham):

 * has_patch:  0 => 1
 * stage:  Accepted => Ready for checkin


--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/069.1ccf2832dd85279045c758550262cfab%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23410: Backward migrations change overall state rather than reverting single migration

2014-11-17 Thread Django
#23410: Backward migrations change overall state rather than reverting single
migration
-+
 Reporter:  Markush2010  |Owner:  nobody
 Type:  New feature  |   Status:  new
Component:  Migrations   |  Version:  1.7
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+

Comment (by carljm):

 Replying to [comment:10 Naddiseo]:
 > Perhaps it would also be prudent to issue a warning if the migrator
 detects that there is potential for data loss?

 I don't think it makes sense to try to have the migrations system classify
 migrations that way (in the general case, it's impossible -- who knows
 what happens inside a `RunSQL` or `RunPython` migration). Adding a flag
 that is required for migrating backwards achieves the same benefit with
 much less complexity.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/069.37654d0a5e00911866b8a8abebe32b02%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23410: Backward migrations change overall state rather than reverting single migration

2014-11-17 Thread Django
#23410: Backward migrations change overall state rather than reverting single
migration
-+
 Reporter:  Markush2010  |Owner:  nobody
 Type:  New feature  |   Status:  new
Component:  Migrations   |  Version:  1.7
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+

Comment (by Naddiseo):

 Perhaps it would also be prudent to issue a warning if the migrator
 detects that there is potential for data loss?

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/069.d05575b6e049817c745f2140b4bf685a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23410: Backward migrations change overall state rather than reverting single migration

2014-11-17 Thread Django
#23410: Backward migrations change overall state rather than reverting single
migration
-+
 Reporter:  Markush2010  |Owner:  nobody
 Type:  New feature  |   Status:  new
Component:  Migrations   |  Version:  1.7
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+

Comment (by carljm):

 Pull request https://github.com/django/django/pull/3562 implements the
 simplest version of this.

 When migrating backwards, instead of migrating to "just after the named
 migration", it migrates to "just before the named migration's immediate
 children in the same app".

 I think this is more likely to be the desired behavior, and runs less risk
 of unintentional rollbacks. When someone names "appA 0001" they are
 expressing a desire about which migrations in appA will be
 applied/unapplied, not about other apps. They are likely to assume that
 migrations in other apps will be applied / rolled back only inasmuch as
 needed required to keep dependencies fulfilled. After this PR, that is the
 case.

 Because of the potential for data loss with unintended rollbacks, I think
 this change should be backported to 1.7.X (and I've updated the 1.7.2
 release notes accordingly).

 There are two other suggestions made in this thread. One is to introduce a
 special syntax that means "right before the named migration". I don't
 think this is necessary. I think the change made here already provides the
 right intuitive behavior for both forwards and backwards migration.

 The other is Anssi's suggestion to require a special flag for all
 backwards migrations, to even further reduce the likelihood of
 unintentional rollback. I think this may be a good idea, but should be
 handled in a separate ticket (and should be a new feature in 1.8, not
 backported to 1.7).

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/069.2164f99e3a1f81142fbfe2e05922a781%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23410: Backward migrations change overall state rather than reverting single migration

2014-09-28 Thread Django
#23410: Backward migrations change overall state rather than reverting single
migration
-+
 Reporter:  Markush2010  |Owner:  nobody
 Type:  New feature  |   Status:  new
Component:  Migrations   |  Version:  1.7
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+
Changes (by aaugustin):

 * type:  Bug => New feature
 * stage:  Unreviewed => Accepted


Comment:

 Yes, let's accept the ticket according to Carl's suggestion in comment 4.

 A convention such as `migrate appname -0002` to migrate to just before
 migration 0002 might work.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/069.45d8a1e2609ae1a3d17538deef9760d6%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23410: Backward migrations change overall state rather than reverting single migration

2014-09-27 Thread Django
#23410: Backward migrations change overall state rather than reverting single
migration
-+--
 Reporter:  Markush2010  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Migrations   |  Version:  1.7
 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 shaib):

 * cc: shaib (added)
 * status:  closed => new
 * resolution:  invalid =>


Comment:

 Reopening based on #comment:4. Note that the duplicate #23474 was marked a
 release-blocker because of the data-loss aspects.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/069.4f36adae9c75e17e7d801555fccac6fa%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23410: Backward migrations change overall state rather than reverting single migration

2014-09-24 Thread Django
#23410: Backward migrations change overall state rather than reverting single
migration
-+--
 Reporter:  Markush2010  |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Migrations   |  Version:  1.7
 Severity:  Normal   |   Resolution:  invalid
 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 Naddiseo):

 * cc: github@… (added)


--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/069.0121f34d585eb94017f5ac3761e60dc9%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23410: Backward migrations change overall state rather than reverting single migration

2014-09-24 Thread Django
#23410: Backward migrations change overall state rather than reverting single
migration
-+--
 Reporter:  Markush2010  |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Migrations   |  Version:  1.7
 Severity:  Normal   |   Resolution:  invalid
 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 carljm):

 #23474 was a duplicate.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/069.0e1da48cd65d126ad34d35dc9e0017a1%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23410: Backward migrations change overall state rather than reverting single migration

2014-09-24 Thread Django
#23410: Backward migrations change overall state rather than reverting single
migration
-+--
 Reporter:  Markush2010  |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Migrations   |  Version:  1.7
 Severity:  Normal   |   Resolution:  invalid
 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 carljm):

 Andrew: I understand the contract you described, and I understand that it
 preserves the invariant that the arguments you pass to "migrate" always
 specify precisely one database state, regardless of whether you are
 migrating forwards or backwards. But I think there is a competing value
 here (reducing the risk of data loss inherent in rolling back migrations
 that arguably were not requested for rollback), which to me seems a higher
 priority than the name-refers-to-single-state invariant.

 If I were to describe the ideal behavior precisely, it would be this:
 given a request to migrate to "appname 0001", we pick whatever target spot
 on the linearized migration plan between "appname 0001" and "appname 0002"
 results in the fewest possible migrations from other apps requiring
 migrate/rollback. The only guaranteed invariant would be that "appname
 0001" refers to a state where "appname 0001" is applied and "appname 0002"
 is not, and all dependency constraints are satisfied.

 This choice would accept that a name like "appname 0001" is imprecise
 rather than precise, but would consider that a reasonable tradeoff in
 exchange for behavior that is (arguably?) more intuitive and less likely
 to result in data loss.

 If you'd rather discuss on the mailing list, I can bring up the question
 there.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/069.f14bbdc541b6c399489b846583c36b09%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23410: Backward migrations change overall state rather than reverting single migration

2014-09-04 Thread Django
#23410: Backward migrations change overall state rather than reverting single
migration
-+--
 Reporter:  Markush2010  |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Migrations   |  Version:  1.7
 Severity:  Normal   |   Resolution:  invalid
 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 andrewgodwin):

 * status:  new => closed
 * resolution:   => invalid
 * severity:  Release blocker => Normal


Comment:

 The test is exactly correct; the contract is that backwards migrations
 roll back to just after the application of the named migration, and all
 its dependencies are unapplied.

 The problem here is the way we specify nodes on the graph - the choice of
 the same namespace and format as forwards migrations is unfortunate, and
 perhaps instead we should have backwards migrations go to *before* the
 named migration rather than afterward (so you're asking to end up with the
 one you named unapplied) - we'd need to have an alternate syntax for this
 now, though, since we've shipped something as it is.

 I'm going to close this as INVALID, as it's performing exactly as designed
 (though unfortunately different to South). I wouldn't be averse to a new
 ticket for better docs or perhaps even a second input argument format for
 "before this migration" rather than "just after", it's the sort of thing
 that would work well for a sprint.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/069.c3b8d4d5c2f0d65574e248628418ce3e%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23410: Backward migrations change overall state rather than reverting single migration

2014-09-04 Thread Django
#23410: Backward migrations change overall state rather than reverting single
migration
-+--
 Reporter:  Markush2010  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Migrations   |  Version:  1.7
 Severity:  Release blocker  |   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 aaugustin):

 This is by design AFAIK.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/069.5184fbef0073ea026a9c327fa5caf842%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23410: Backward migrations change overall state rather than reverting single migration

2014-09-03 Thread Django
#23410: Backward migrations change overall state rather than reverting single
migration
-+--
 Reporter:  Markush2010  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Migrations   |  Version:  1.7
 Severity:  Release blocker  |   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 collinanderson):

 * needs_better_patch:   => 0
 * severity:  Normal => Release blocker
 * needs_tests:   => 0
 * needs_docs:   => 0


Comment:

 marking as unaccepted release blocker to give this attention, as this
 could have data loss issues. It may be we simply need to better document
 the situation.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/069.2ce883306987d29cd85ed0bc5e3dedae%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.