#36273: Move Index system checks from Model to Index.check()
-------------------------------------+-------------------------------------
Reporter: Tim Graham | Owner: Tim
Type: | Graham
Cleanup/optimization | Status: assigned
Component: Core (System | Version: dev
checks) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Simon Charette):
* cc: Simon Charette (added)
Comment:
Tanish, you haven't provided any updates in the past month, are you still
actively working on this?
----
> `Index.__init__()` does a lot argument validation and I don't see a
reason why the validation of name should be treated differently.
I suspect that one of the intent was that this validation could be
silenced on databases that don't have Oracle-like restriction in index
names; if the validation is performed at `__init__` time there's no way to
silence it.
I'm not sure I agree with the ''cleaner and more consistent'' rationale of
#30613 either but the move to `Index.check(model, connection)` should
allow at least allow these checks to be eventually truly database specific
(as they truly are only relevant on Oracle). In all cases I don't think it
should be a blocker for this work and that we should focus our efforts on
whether or not we believe ticket:31286#comment:9 is an adequate solution
for the general problem of database related checks not running for
database related commands.
--
Ticket URL: <
https://code.djangoproject.com/ticket/36273#comment:8>