fix(schema): ensure int-int comparison (#34320)

Some fields somehow have string lengths apparently

Resolves #34318 and support ticket 50658

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
This commit is contained in:
Akhil Narang 2025-10-09 15:25:50 +05:30 committed by GitHub
parent 686dbe1a34
commit cf75128617
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -444,7 +444,7 @@ def get_definition(fieldtype, precision=None, length=None, *, options=None):
if length:
if coltype == "varchar":
# Reference: https://mariadb.com/docs/server/server-usage/storage-engines/innodb/innodb-row-formats/troubleshooting-row-size-too-large-errors-with-innodb
if length < 64:
if cint(length) < 64:
length = 64
size = length
elif coltype == "int" and length < 11: