Changes between Version 1 and Version 2 of Ticket #31286, comment 9


Ignore:
Timestamp:
Apr 6, 2025, 3:34:14 PM (5 months ago)
Author:
Simon Charette

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #31286, comment 9

    v1 v2  
    88Now in retrospect I think that making the `check` command default `databases=None` to `[]` instead of `list(connections)` might have been a mistake but it's also not clear whether `[DEFAULT_DB_ALIAS]` might not have been also a good candidate (that's what other database related commands do)
    99
    10 In summary I wouldn't be opposed to reverting the part of this patch that made `check` default to checking all databases (or only the `default` one) but we must maintain the part that made check databases aware as it's something the migration and testing framework rely on.
     10In summary I wouldn't be opposed to reverting part of this patch that have `check` default to all databases (or only the `default` one) but we must maintain the part that made check databases aware as it's something the migration and testing framework rely on.
    1111
    1212> Although it's documented that "Database checks are not run by default because they do more than static code analysis as regular checks do," the ​database-specific field checks are only static analysis (as opposed to something like ​the MySQL check for strict mode which does query the database), so I see no reason they shouldn't be included as part of the normal checks.
    1313
    14 I don't disagree in principle but that seems like a totally different can of worm isn't it? Database checks [https://github.com/django/django/commit/0b83c8cc4db95812f1e15ca19d78614e94cf38dd#diff-f10ce154e1f5bcdba92b54ebf8cb57357b404a3f03ab51ca85a031358f7372ecL66-L69 were never ran by default even prior to this patch] so it has little to do this with this particular ticket beyond the fact that specifying a `--database` is now the opt-in for enabling those instead of `--tag database`.
     14I don't disagree in principle but that seems like a somewhat different can of worm isn't it? Database checks [https://github.com/django/django/commit/0b83c8cc4db95812f1e15ca19d78614e94cf38dd#diff-f10ce154e1f5bcdba92b54ebf8cb57357b404a3f03ab51ca85a031358f7372ecL66-L69 were never ran by default even prior to this patch] so it has little to do this with this particular ticket beyond the fact that specifying a `--database` is now the opt-in for enabling those instead of `--tag database`.
Back to Top