Re: [Django] #30362: Partial indexes and check constraints crash when inherited from abstract models.

2019-04-24 Thread Django
#30362: Partial indexes and check constraints crash when inherited from abstract
models.
-+-
 Reporter:  Tim Dawborn  |Owner:  felixxm
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  2.2
  (models, ORM)  |
 Severity:  Release blocker  |   Resolution:
 Keywords:  inheritance index| Triage Stage:  Accepted
  name   |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by felixxm):

 * status:  new => assigned
 * owner:  nobody => felixxm


Comment:

 I added two related tickets for master #30396 and  #30397.

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


Re: [Django] #30362: Partial indexes and check constraints crash when inherited from abstract models.

2019-04-18 Thread Django
#30362: Partial indexes and check constraints crash when inherited from abstract
models.
-+-
 Reporter:  Tim Dawborn  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  2.2
  (models, ORM)  |
 Severity:  Release blocker  |   Resolution:
 Keywords:  inheritance index| Triage Stage:  Accepted
  name   |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Can Sarıgöl):

 I want to emphasize, it is not just about abstract models. even so, will
 we just document it or can we proceed with the check code?

 For new feature I'm waiting for the new ticket after that I'll separate my
 pr.

 I'm sorry if I misunderstood :)

 Replying to [comment:9 felixxm]:
 > IMO in Django 2.2 we should document that partial indexes and check
 constraints cannot be used in abstract models with many inheriting models;

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


Re: [Django] #30362: Partial indexes and check constraints crash when inherited from abstract models.

2019-04-18 Thread Django
#30362: Partial indexes and check constraints crash when inherited from abstract
models.
-+-
 Reporter:  Tim Dawborn  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  2.2
  (models, ORM)  |
 Severity:  Release blocker  |   Resolution:
 Keywords:  inheritance index| Triage Stage:  Accepted
  name   |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by felixxm):

 * has_patch:  1 => 0


Comment:

 Please see
 [https://code.djangoproject.com/ticket/30362?replyto=10#comment:9
 comment]. IMO we will not backport a new feature to the 2.2.x release,
 proposed patch requires a separate ticket targeted to the master (3.0)
 release. You can add a cross reference to the above discussion.

 Replying to [comment:10 Can Sarıgöl]:
 > Hi, I tried to add a control for the fix unique index name. as far as I
 could see, the problem is not just about abstract models. So my apporach
 was that adding the control into model_checks.py. I tried to add the dict
 params in name property as well as mentioned by Simon.

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


Re: [Django] #30362: Partial indexes and check constraints crash when inherited from abstract models.

2019-04-18 Thread Django
#30362: Partial indexes and check constraints crash when inherited from abstract
models.
-+-
 Reporter:  Tim Dawborn  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  2.2
  (models, ORM)  |
 Severity:  Release blocker  |   Resolution:
 Keywords:  inheritance index| Triage Stage:  Accepted
  name   |
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Can Sarıgöl):

 * cc: Can Sarıgöl (added)
 * has_patch:  0 => 1


Comment:

 Hi, I tried to add a control for the fix unique index name. as far as I
 could see, the problem is not just about abstract models. So my apporach
 was that adding the control into model_checks.py. I tried to add the dict
 params in name property as well as mentioned by Simon.

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


Re: [Django] #30362: Partial indexes and check constraints crash when inherited from abstract models.

2019-04-16 Thread Django
#30362: Partial indexes and check constraints crash when inherited from abstract
models.
-+-
 Reporter:  Tim Dawborn  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  2.2
  (models, ORM)  |
 Severity:  Release blocker  |   Resolution:
 Keywords:  inheritance index| Triage Stage:  Accepted
  name   |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by felixxm):

 IMO in Django 2.2 we should document that partial indexes and check
 constraints cannot be used in abstract models with many inheriting models;
 and in Django 3.0 we can add a new feature proposed by Simon (separate
 ticket).

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


Re: [Django] #30362: Partial indexes and check constraints crash when inherited from abstract models.

2019-04-14 Thread Django
#30362: Partial indexes and check constraints crash when inherited from abstract
models.
-+-
 Reporter:  Tim Dawborn  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  2.2
  (models, ORM)  |
 Severity:  Release blocker  |   Resolution:
 Keywords:  inheritance index| Triage Stage:  Accepted
  name   |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Tim Dawborn):

 Replying to [comment:7 Ian Foote]:
 > I like Simon's idea of allowing {{{%(app_label)s}}} and {{{%(class)s}}}
 in index and constraint names.

 Same, assuming these get evaluated at the the lowest concrete class of an
 inheritance hierarchy.

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


Re: [Django] #30362: Partial indexes and check constraints crash when inherited from abstract models.

2019-04-14 Thread Django
#30362: Partial indexes and check constraints crash when inherited from abstract
models.
-+-
 Reporter:  Tim Dawborn  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  2.2
  (models, ORM)  |
 Severity:  Release blocker  |   Resolution:
 Keywords:  inheritance index| Triage Stage:  Accepted
  name   |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Ian Foote):

 The motivation for requiring an explicit name is largely because auto-
 generating index names caused a lot of pain in the past. The core devs at
 the time decided explicit is better than implicit.

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


Re: [Django] #30362: Partial indexes and check constraints crash when inherited from abstract models.

2019-04-13 Thread Django
#30362: Partial indexes and check constraints crash when inherited from abstract
models.
-+-
 Reporter:  Tim Dawborn  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  2.2
  (models, ORM)  |
 Severity:  Release blocker  |   Resolution:
 Keywords:  inheritance index| Triage Stage:  Accepted
  name   |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Simon Charette):

 The way we currently deal this class of issue for inherited
 `ForeignKey(related_name, related_query_name)` is to
 [https://docs.djangoproject.com/en/2.2/topics/db/models/#be-careful-with-
 related-name-and-related-query-name allow formatting placeholders].

 I suggest we do the same here by allowing `%(app_label)s`  and `%(class)s`
 to be specified in `name` and that a similar check to the `related_name`
 conflicts one be 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/068.82032648ea55f323d95eb64758483fd9%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #30362: Partial indexes and check constraints crash when inherited from abstract models.

2019-04-13 Thread Django
#30362: Partial indexes and check constraints crash when inherited from abstract
models.
-+-
 Reporter:  Tim Dawborn  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  2.2
  (models, ORM)  |
 Severity:  Release blocker  |   Resolution:
 Keywords:  inheritance index| Triage Stage:  Accepted
  name   |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Tim Dawborn):

 Replying to [comment:4 Ian Foote]:
 > A check seems sensible to me, as does documentation. I'm less sure about
 the callable idea, but it could work.

 Well, what I'd actually like is to not have to specify the index name, and
 let Django construct it like it does index names for Index's that don't
 contain conditions. The callable suggestion was a work around for having
 to explicitly specify a name.

 Can I ask what the motivation for explicitly requiring an index name was
 when providing a condition?

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


Re: [Django] #30362: Partial indexes and check constraints crash when inherited from abstract models.

2019-04-13 Thread Django
#30362: Partial indexes and check constraints crash when inherited from abstract
models.
-+-
 Reporter:  Tim Dawborn  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  2.2
  (models, ORM)  |
 Severity:  Release blocker  |   Resolution:
 Keywords:  inheritance index| Triage Stage:  Accepted
  name   |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Ian Foote):

 A check seems sensible to me, as does documentation. I'm less sure about
 the callable idea, but it could 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/068.d72dd5e7e86b46b55364f0d2d607%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #30362: Partial indexes and check constraints crash when inherited from abstract models.

2019-04-13 Thread Django
#30362: Partial indexes and check constraints crash when inherited from abstract
models.
-+-
 Reporter:  Tim Dawborn  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  2.2
  (models, ORM)  |
 Severity:  Release blocker  |   Resolution:
 Keywords:  inheritance index| Triage Stage:  Accepted
  name   |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Tim Dawborn):

 I personally would like to have seen `name` optionally take a callable
 which receives the model object, so that the name of the index could be,
 for example, prefixed with the class name of the model in the concrete
 class. If there's no desire for that sort of functionality, then adding a
 check for this situation sounds like a sensible alternative to prevent
 others from falling into this trap.

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


Re: [Django] #30362: Partial indexes and check constraints crash when inherited from abstract models. (was: Indexes defined on abstract base classes with conditions result in an invalid state due to `

2019-04-13 Thread Django
#30362: Partial indexes and check constraints crash when inherited from abstract
models.
-+-
 Reporter:  Tim Dawborn  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  2.2
  (models, ORM)  |
 Severity:  Release blocker  |   Resolution:
 Keywords:  inheritance index| Triage Stage:  Accepted
  name   |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

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