say you have
# form here
db.define_table('mytable',Field('a'))
# to here
and you have some data in it:
1) modify the above line as:
#from here
db.define_table('mytable',Field('a'),Field('b'))
db(db.myable.id>0).update(b=db.mytable.a)
# to here
2) run appadmin once
3) modify the above two lines as
# form here
db.define_table('mytable',Field('b'))
# to here
4) Done.
Caveat:
This would not work on GAE for various reasons. You would have to run
over all rows
for row in db(db.myable.id>0).select(): row.update_record(b=row.a)
and almost certainly you would run into timeout issues.
--
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en.