Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Integer of higher length than 11 #18
I can't seem to find a way for pony to specify a db int field with a length > 11, so if I try and insert something longer than 11 digits, I get:
If I increase the column length manually of the database column, the same problem persists. Any ideas / suggestions?
The resulting error is not silent, the exception
I'm not sure about deprecation. For projects where porting to Python 3 is not planned, using
I need to think a bit more about this topic.
Nice to listen to you! Please note:
attr1 = Required(int, size=8) # 8 bit - TINYINT in MySQL attr2 = Required(int, size=16) # 16 bit - SMALLINT in MySQL attr3 = Required(int, size=24) # 24 bit - MEDIUMINT in MySQL attr4 = Required(int, size=32) # 32 bit - INTEGER in MySQL attr5 = Required(int, size=64) # 64 bit - BIGINT in MySQL
You can use the
The default value of the
If current database does not support specified attribute size, the next bigger size is used. For example, PostgreSQL does not have
Only MySQL actually supports unsigned types. For other databases the column will use signed numeric type which can hold all valid values for the specified unsigned type. For example, in PostgreSQL an unsigned attribute with size 16 will use
When size is specified, Pony automatically assigns
Starting with the Pony release 0.6 the