```
from django.conf import settings
from django.db import router, connections


def get_connection(cls):
        allowed_len = None
        db_alias = None
        vals = []
        for db in settings.DATABASES.keys():
                if not router.allow_migrate(db, cls):
                        continue
                db_alias = db
                connection = connections[db]
                allowed_len = connection.ops.max_name_length()

        vals.extend((db_alias, allowed_len))
        return vals
```
@unittest.skipIf(get_connection(***)[1] is None, "The database does not limits field name length")
```

```