#26892: Add documentation about db_constraint for FK and M2M in Multiple 
Databases
section
-------------------------------------+-------------------------------------
     Reporter:  Pawamoy              |      Owner:  nobody
         Type:                       |     Status:  new
  Cleanup/optimization               |
    Component:  Documentation        |    Version:  1.9
     Severity:  Normal               |   Keywords:  fk m2m db_constraint
                                     |  doc
 Triage Stage:  Unreviewed           |  Has patch:  0
Easy pickings:  1                    |      UI/UX:  0
-------------------------------------+-------------------------------------
 Working on a project that uses several databases, I have searched for a
 long time the best way to have "fake" or "cross-db" foreign keys between
 tables that are not on the same database.

 I was very surprised when I recently heard about the db_constraint
 attribute in model fields ForeignKey and ManyToManyField, and wondered why
 I have found so many ugly hacks before this very Django feature.

 Documentation in the Multiple Databases section was very useful, but it
 would have been a lot more if db_constraint was mentioned in it. And a
 link back to Multiple Databases from ForeignKey and ManyToManyField
 db_constraint in model fields reference would also be great.

 In don't know when db_constraint appeared but this modification should of
 course apply to each concerned version of Django (I know 1.8 and following
 are).

 https://docs.djangoproject.com/en/1.9/topics/db/multi-db/
 
https://docs.djangoproject.com/en/1.9/ref/models/fields/#django.db.models.ForeignKey.db_constraint
 
https://docs.djangoproject.com/en/1.9/ref/models/fields/#django.db.models.ManyToManyField.db_constraint

--
Ticket URL: <https://code.djangoproject.com/ticket/26892>
Django <https://code.djangoproject.com/>
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/050.48c73761fa6080c31e2786ca0c536f95%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to