Re: [Django] #25492: Check deferred foreign key constraints before dropping them

2016-12-24 Thread Django
#25492: Check deferred foreign key constraints before dropping them
-+-
 Reporter:  Joey Wilhelm |Owner:  nobody
 Type:  New feature  |   Status:  closed
Component:  Core (System |  Version:  master
  checks)|
 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 Simon Charette ):

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


Comment:

 In [changeset:"cd7efa20338cb6f3ede4780e00590c0a6dd48ca2" cd7efa20]:
 {{{
 #!CommitTicketReference repository=""
 revision="cd7efa20338cb6f3ede4780e00590c0a6dd48ca2"
 Fixed #25492 -- Checked deferred foreign key constraints before dropping
 them.

 This allows running foreign key data and schema altering operations in the
 same migration on PostgreSQL.

 Thanks Tim for review.
 }}}

--
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.3a1171c7c8f6a4924de93745ced0ae07%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #25492: Check deferred foreign key constraints before dropping them

2016-12-24 Thread Django
#25492: Check deferred foreign key constraints before dropping them
-+-
 Reporter:  Joey Wilhelm |Owner:  nobody
 Type:  New feature  |   Status:  new
Component:  Core (System |  Version:  master
  checks)|
 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 Tim Graham):

 * 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.a8928fde270da77d6da097597acdb71a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #25492: Check deferred foreign key constraints before dropping them

2016-12-21 Thread Django
#25492: Check deferred foreign key constraints before dropping them
--+
 Reporter:  Joey Wilhelm  |Owner:  nobody
 Type:  New feature   |   Status:  new
Component:  Core (System checks)  |  Version:  master
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+
Changes (by Simon Charette):

 * stage:  Ready for checkin => Accepted


Comment:

 I adjusted the patch to perform `SET CONSTRAINT %(name)s IMMEDIATE` before
 dropping a constraint only on PostgreSQL as it's the only backend that
 supports both deferrable foreign keys and transactional DDL which are the
 two conditions required for this issue to arise.

 I used feature detection with `skipUnlessDbFeature` to make sure the test
 will be run on SQLite If we were to make foreign keys `DEFERRABLE
 INITIALLY DEFERRED`
 [https://code.djangoproject.com/ticket/14204#comment:19 like they are on
 PostgreSQL and Oracle].

 @shai
 > Haven't got time to review the patch, just wanted to note that mixing
 schema-altering operations with data-modifying operations can have other
 issues, mostly related to deferred SQL

 Don't worry, this patch isn't about encouraging  both types of alteration
 to be performed in the same migration which is another can of worm. It's
 focusing on making sure we perform the pending checks on foreign key
 constraints before dropping them.

--
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.1edb53fe11d8afb4913849861dabadef%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #25492: Check deferred foreign key constraints before dropping them

2016-12-19 Thread Django
#25492: Check deferred foreign key constraints before dropping them
-+-
 Reporter:  Joey Wilhelm |Owner:  nobody
 Type:  New feature  |   Status:  new
Component:  Core (System |  Version:  master
  checks)|
 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
-+-

Comment (by Shai Berger):

 Haven't got time to review the patch, just wanted to note that mixing
 schema-altering operations with data-modifying operations can have other
 issues, mostly related to deferred SQL (statements that an operation
 queues to be performed only at the end of the migration; FK creation does
 that, and probably some others too).

--
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.3300810ff45890b13019f22a281ae846%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #25492: Check deferred foreign key constraints before dropping them (was: warn about migrations mixing schema- and data- changing operations)

2016-12-19 Thread Django
#25492: Check deferred foreign key constraints before dropping them
-+-
 Reporter:  Joey Wilhelm |Owner:  nobody
 Type:  New feature  |   Status:  new
Component:  Core (System |  Version:  master
  checks)|
 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 Simon Charette):

 * cc: Simon Charette (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.a2bebaaecd29f196af0ed281b7a85499%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.