You can't just change the field type, you have to create another column of string type then insert your data from a select of the other column into it then delete the old useless column... You need to transform the integer into text at the insert step...
Richard On Mon, Oct 24, 2016 at 3:32 PM, Ian W. Scott <[email protected]> wrote: > I'm using Postgresql and I need to migrate the data type of a field from > "integer" to "string". Will it work to just change the field type in the > model table definition? What will happen to the existing "integer" data? > Any problems foreseen? > > Thanks, > > Ian > > -- > 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 [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- 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 [email protected]. For more options, visit https://groups.google.com/d/optout.

