How about playing around with something simple like this...
db2.define_table('client2',db1.client1)
rows = db1(db1.client1.id >1).select()
for row in rows: db2.client2.insert(**row)
(sorry, I didn't test it and it's probably nonsense, but it might
spark an idea for you!)
-D
On Jan 25, 5:29 pm, VP <[email protected]> wrote:
> I'd like to add a more general request to this. It'd would be nice if
> web2py has a slick mechanism to migrate/copy database tables. For
> example
>
> db_copy(db_1.table1, db_2.table1)
>
> this will copy the entire table1 of db_1 into the same table of
> db_2. I often worked locally using sqlite (as it's self contained)
> and deployed using postgres/mysql. I'd like to be able to copy
> information from production back to development like this. Web2py
> has a convenient way to pack and unpack applications. But for
> database, it'd be nice to have some support like this.