Used constant instead of hard-coded value for max index name length

Refs #26709
This commit is contained in:
Mads Jensen 2017-03-14 13:29:22 +01:00 committed by Markus Holtermann
parent 6f913c0305
commit e7033e00f8
No known key found for this signature in database
GPG Key ID: AFE79D68D41C7E39
1 changed files with 1 additions and 1 deletions

View File

@ -106,7 +106,7 @@ class Index:
column_names[0][:7],
'%s_%s' % (self._hash_generator(*hash_data), self.suffix),
)
assert len(self.name) <= 30, (
assert len(self.name) <= MAX_NAME_LENGTH, (
'Index too long for multiple database support. Is self.suffix '
'longer than 3 characters?'
)