On Friday, November 16, 2012 9:23:33 PM UTC+1, Joseph.Piron wrote:
>
> No I can't, here I have to stock and let the user enter 2**31 and not 
> 2**31-1
> As everything else is possible, shouldn't it be possible to add a 
> aprameter to the field constructor to set unsigned ?
> That would be really handy in situation such as mine where I have to 
> deploy the solution on many servers.
>>
>>
>> 2**31 is not even allowed in a normal 'integer' field. That is a math 
notation not supported and requires a whole different validation (and 
parsing).
 
What we are saying is that :
a) if you place a requires=IS_INT_IN_RANGE(0) there's no way any user can 
enter "-12" and submit that value, no matter what the underlying column 
type is set on the db
b) you can alter the column type "a posteriori" and web2py will be happy 
with that even if your model specifies 'integer'

PS: c) 
- deploy your app to the 1st server
- take the sql.log you can find in the databases/ folder
- alter the column format as you wish in the declaration
- execute those statements on all the other servers
- deploy your app with migrate=False (which you should do in any case if 
your model doesn't change)

-- 



Reply via email to