Regarding multiple database support, I believe we want to do something like this:
```
from django.conf import settings
from django.db import connections

for db in settings.DATABASES.keys():
   # skip databases where the model won't be created
   if not router.allow_migrate(db, cls):
       continue
   connection = connections[db]
   allowed_len = connection.ops.max_name_length()
   ...
```
We can also go back to putting the database alias (`db`) in the error message.