#11964: Add the ability to use database-level CHECK CONSTRAINTS
-------------------------------------+-------------------------------------
Reporter: Matthew Schinckel | Owner: Ian Foote
Type: New feature | Status: closed
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution: fixed
Keywords: check constraint | 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 Scott Stevens):
It appears that adding multiple constraints to a table results in only the
last being stored.
Reviewing the SQL (`./manage.py migrate`), I'm seeing each constraint
being added by way of `ALTER TABLE`, `CREATE TABLE`, `INSERT INTO ...
SELECT`, `DROP TABLE`, however only the most recent constraint is added
each time, so the previous constraint is dropped with the old table when
adding the new one.
Using `38f3de86bd0bfa4c9b57db1237fa55e9fa88bc6e`, Python 3.6.6 (Win10x64)
with SQLite database.
Should I file a new bug for this?
--
Ticket URL: <https://code.djangoproject.com/ticket/11964#comment:36>
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/067.d767feee1817d4ab4587b4ebd9103b0a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.