          class Model(models.Model):
              value = models.TextField(db_index=True)
          field = Model._meta.get_field('value')
          field_type = field.db_type(connection)
          self.assertEqual(field.check(), [
              DjangoWarning(
                  '%s does not support a database index on %s columns.'
                  % (connection.display_name, field_type),
                  hint=(
                      "An index won't be created. Silence this warning if you "
 
</s> remove             self.assertEqual(field.check(), [error])
 </s> add             self.assertEqual(field.check(databases={'default'}), [error]) </s> remove                 model.check()
 </s> add                 model.check(databases={'default', 'other'}) </s> remove         for db in connections:
            if router.allow_migrate(db, app_label, model_name=self.model._meta.model_name):
                return connections[db].validation.check_field(self, **kwargs)
        return []
 </s> add         errors = []
        for alias in databases:
            if router.allow_migrate(alias, app_label, model_name=self.model._meta.model_name):
                errors.extend(connections[alias].validation.check_field(self, **kwargs))
        return errors </s> remove                 model.check()
 </s> add                 model.check(databases={'default', 'other'}) </s> remove     def _check_backend_specific_checks(self, **kwargs):
 </s> add     def _check_backend_specific_checks(self, databases=None, **kwargs):
        if databases is None:
            return []
        self.assertEqual(field.check(databases=self.databases), [
          class Model(models.Model):
              value = models.TextField(db_index=True)
          field = Model._meta.get_field('value')
          field_type = field.db_type(connection)
        self.assertEqual(field.check(databases=self.databases), [
              DjangoWarning(
                  '%s does not support a database index on %s columns.'
                  % (connection.display_name, field_type),
                  hint=(
                      "An index won't be created. Silence this warning if you "
keep keep keep keep replace keep keep keep keep keep
 Fixed #31286 -- Made database specific fields checks databases aware.

Follow up to 0b83c8cc4db95812f1e15ca19d78614e94cf38dd. 
tests/invalid_models_tests/test_ordinary_fields.py