--
Ticket URL: <https://code.djangoproject.com/ticket/18088>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
Comment:
I wonder if we really need both can_introspect_foreign_keys and
supports_foreign_key... Could you investigate?
--
Ticket URL: <https://code.djangoproject.com/ticket/18088#comment:1>
Comment (by akaariai):
Surprisingly we can introspect foreign keys on SQLite, but they are not
enforced. Worth a comment though.
--
Ticket URL: <https://code.djangoproject.com/ticket/18088#comment:2>
Comment (by russellm):
@akaariai -- they're not enforced *currently*, but they could be. Foreign
key constraints were only added in SQLite 3.6.19 (see #14204); Django's
SQLite backend doesn't currently provide any way to exploit them.
--
Ticket URL: <https://code.djangoproject.com/ticket/18088#comment:3>
* has_patch: 0 => 1
Comment:
Understood.
Main point is that supports_foreign_keys is not always the same as
can_introspect_foreign_keys. It would be actually possible to check if the
SQLite backend supports foreign keys in the _supports_foreign_keys() call
of SQLite. I am not going to piggy-back that change into this ticket. The
current changes are relatively simple, SQLite foreign key support is not.
--
Ticket URL: <https://code.djangoproject.com/ticket/18088#comment:4>
* keywords: => web design companies
* needs_tests: 0 => 1
Comment:
The utilization of databases is now so widespread that virtually every
technology and product relies on databases and DBMSs for its development
and commercialization, or even may have such software embedded in it.
Also, organizations and companies, from small to large, depend heavily on
databases for their operations. Thanks.
Regards,
http://www.webdesigncompanies.com/
--
Ticket URL: <https://code.djangoproject.com/ticket/18088#comment:5>
* stage: Unreviewed => Design decision needed
Comment:
Sqlite 3.6.19 was released nearly three years ago. Debian stable ships
Sqlite 3.7.3.
Shouldn't we at some point:
- have a minimal version requirement for Sqlite,
- deprecate support for MySQL + MyISAM,
and support only "sane" databases -- that is, databases that enforce
foreign keys?
This is well beyond the scope of this ticket, but I'm not thrilled by the
idea of adding code to deal with broken databases. Make that a -0...
--
Ticket URL: <https://code.djangoproject.com/ticket/18088#comment:5>
Comment (by aaugustin):
Can we make a decision? Anssi, it's your call.
--
Ticket URL: <https://code.djangoproject.com/ticket/18088#comment:6>
* stage: Design decision needed => Accepted
Comment:
I think that as long as we have databases that do not support foreign keys
then supports_foreign_keys flag is needed. So, accepted. This could of
course be closed if somebody were to remove all databases without foreign
key support.
--
Ticket URL: <https://code.djangoproject.com/ticket/18088#comment:7>
* needs_better_patch: 0 => 1
Comment:
Patch no longer applies cleanly.
--
Ticket URL: <https://code.djangoproject.com/ticket/18088#comment:8>
Comment (by timgraham):
The `supports_foreign_keys` flag was added in
d683263f97aedd67f17f4b78ac65d915f4e70d36, but there are still bits of the
proposed patch that could be applied.
--
Ticket URL: <https://code.djangoproject.com/ticket/18088#comment:9>