[web2py] Re: Postgresql interface buggy

2010-01-28 Thread mdipierro
I will give this a try. This type of conversion should work unless there is a problem with transactions that holds it up and timesout. On Jan 28, 3:02 am, Johann Spies wrote: > On 28 January 2010 00:15, Thadeus Burgess wrote: > > > This is most likely a bug, would you be willing to provide more

Re: [web2py] Re: Postgresql interface buggy

2010-01-27 Thread Thadeus Burgess
generic, their quite powerful though. But a single function called from the web2py command line to convert between data types shouldn't be that hard. of course, you "should" have your data types set out before the app ever hits production so migrations like this usually mean deleting the sqlite da

[web2py] Re: Postgresql interface buggy

2010-01-27 Thread mdipierro
When you change a field type web2py automatically creates tmp column of the new type, copies data, delete the old column and renames the tmp column. This works great if you convert, for example an int to string. How well it works depends on the database and the type of conversion. If you want some

Re: [web2py] Re: Postgresql interface buggy

2010-01-27 Thread Thadeus Burgess
What about data type conversion though. In rails this is why you have to define migrations in rake script. Would it even be worth it for web2py ? Could we load the database column to a csv file, have web2py automate the drop column create column and new insert to the new data type? -Thadeus

[web2py] Re: Postgresql interface buggy

2010-01-27 Thread mdipierro
The problem is that changing a type is not always well defined. In particular if you have data in the column the database may not be able to convert the data from the old type to the new type. If you need to change a type the safe way if by deleting the column, run admin, add the column again of a