Using this code:

import copy

db._adapter.dialect.types = copy.copy(db._adapter.dialect.types)
db._adapter.dialect.types['boolean']='TINYINT(1)'
db._adapter.dialect.TRUE = 1
db._adapter.dialect.FALSE = 0

It doesn't crash, and seems that can execute queries successfully, but when 
I read a record from the database all the boolean fields are set to false 
even if in the db they aren't..

Emilio

Il giorno sabato 11 agosto 2018 15:34:16 UTC+2, Anthony ha scritto:
>
> Does it work if you replace db._adapter.types with 
> db._adapter.dialect.types (the former is now an @property that points to 
> the latter)?
>
> Anthony
>
> On Saturday, August 11, 2018 at 9:19:05 AM UTC-4, Emilio wrote:
>>
>> Hi,
>> I have a website using the old release "web2py-R-2.9.12" and it works 
>> relying on this workaround: 
>>
>> db._adapter.types = copy.copy(db._adapter.types)
>> db._adapter.types['boolean']='TINYINT(1)'
>> db._adapter.TRUE = 1
>> db._adapter.FALSE = 0
>>
>> That I found here: 
>> https://groups.google.com/forum/#!topic/web2py/IukqqZF_PPE
>>
>> But in the recent releases (I'm upgrading to the R-2.17.1), it gives this 
>> error:
>>
>> [image: Schermata da 2018-08-09 11-37-04.png]
>> It's there anything I can do without rewriting all the table definitions?
>> Thanks
>>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to