Thanks Paolo. That was it. I forgot that I had set migrate to False. I 
really feel foolish, but thanks for pointing me in the right direction.

Ian

On Friday, January 9, 2015 at 4:23:27 PM UTC-5, Paolo Valleri wrote:
>
> Hi,
> I've checked and web2py trunk works as expected (both directions namely 
> string to text and viceversa)
> @scott, have you enabled migration? ( DAL(db_uri, migrate=True))
>
> Paolo
>
> On Friday, January 9, 2015 at 7:38:08 PM UTC+1, Ian W. Scott wrote:
>>
>> OK, I'm upgrading. Ran into a snag with my passwords file and finding the 
>> right port number, but when it's upgraded I'll see whether it does the 
>> migration correctly.
>>
>> Thanks
>>
>> On Thursday, January 8, 2015 at 11:47:54 PM UTC-5, Massimo Di Pierro 
>> wrote:
>>>
>>> Please upgrade. This should have worked with that version but this is so 
>>> old. Hard to day what the problem is.
>>>
>>> On Wednesday, 7 January 2015 13:42:52 UTC-6, Ian W. Scott wrote:
>>>>
>>>> 2.8.2-stable+timestamp.2013.11.28.13.54.07
>>>> (Running on Apache/2.2.17 (Unix) mod_wsgi/3.3 Python/2.7.8)
>>>>
>>>> On Wednesday, January 7, 2015 2:22:57 PM UTC-5, Massimo Di Pierro wrote:
>>>>>
>>>>> which web2py version/date?
>>>>>
>>>>> On Wednesday, 7 January 2015 12:49:29 UTC-6, Ian W. Scott wrote:
>>>>>>
>>>>>> I need to migrate an existing database field from (the implicit 
>>>>>> default) 'string' to 'text'. Since all of the existing data will satisfy 
>>>>>> the new field contstraints (no 'string' will be ruled out as 'text') I 
>>>>>> just 
>>>>>> changed the field type in the model field definition. 
>>>>>>
>>>>>> Old:
>>>>>>     Field('response1'),
>>>>>> New:
>>>>>>     Field('response1', 'text'),
>>>>>>
>>>>>> Everything seemed to go fine until I tried creating a new record 
>>>>>> with a long string in that field. I got the following error: 
>>>>>>
>>>>>> <class 'psycopg2.DataError'>(value too long for type character 
>>>>>> varying(512) ). 
>>>>>>
>>>>>> It looks to me like my postgresql database hasn't actually changed 
>>>>>> the data type for that column. I thought this would be taken care of by 
>>>>>> the 
>>>>>> DAL migration. So how can I change the actual postgre column data type? 
>>>>>> Or 
>>>>>> did I do something wrong in the migration?
>>>>>>
>>>>>

-- 
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