[web2py] Re: Problems changing table definition

2010-07-21 Thread mdipierro
In these cases you can still do the migrations in web2py but you have to do them in two steps: 1) remove the column 2) run appadmin 3) add the new column 4) run appadmin if you do migrations that involved a change in a column in one step, web2py tries to port the data and that is not always possi

[web2py] Re: Problems changing table definition

2010-07-21 Thread howesc
I agree with massimo about using web2py's migration features where possible. Unfortunately there are some migrations that web2py just cannot do if there is data in the table (at least that was true in postgres a while ago). Such things include making a previous nullable field not nullable, and i

[web2py] Re: Problems changing table definition

2010-07-21 Thread Paul Gerrard
Thanks - I already do nightly backups of data and code (been stung too many times before). I want to use Web2p as you say, but I've had problems in the past. 2-3 times, no matter what I've tried, I couldn't edit the DB.py file and avoid crashes. Ended up deleting tables, massaging data with MS Acc

[web2py] Re: Problems changing table definition

2010-07-21 Thread mdipierro
It is better to always use web2py but remember to use (default) migrate=True every time you edit the db. You may also want to keep a backup of your database/*.tables On Jul 21, 4:54 am, Paul Gerrard wrote: > An updqate. > > I read the manual 6.4 on Migrations. I've added a migrate='tablename' > a

[web2py] Re: Problems changing table definition

2010-07-21 Thread Paul Gerrard
An updqate. I read the manual 6.4 on Migrations. I've added a migrate='tablename' aramter to the table definition call. It seems to work. So I guess I've disconnected the table definition from the Web2py table history. So far so good. So I have a more general point. "Is it 'better' to manage da