very useful!

On Jun 22, 2:02 am, mdipierro <mdipie...@cs.depaul.edu> wrote:
> yes you can migrate an entire database from the shell with one
> command:
>
> 1) have a model that connects to the sqliite db
> 2) python web2py -S yourapp -M
> 3) in the shell type
>
>    db.export_to_csv_file(open('somefile.csv','wb'))
>
> 4) quit, edit the model to connect to the other db instead
> 5) python web2py -S yourapp -M
> 6) in the shell type
>
>    db.import_from_csv_file(open('somefile.csv','rb'))
>
> 7) done. Id's we'll be different but references will be preserved and
> not be broken.
>
> Massimo
>
> On Jun 21, 8:58 am, carlo <syseng...@gmail.com> wrote:
>
> > maybe I am not fully up to date with the latest web2py releases so
> > chech this out:
>
> > db structure: if you have an existing mysql db with the same structure
> > as the sqlite db, it is just a matter of changing the connect string
> > in the model
>
> > db data: I think web2py does not care for migrating data from one db
> > to another (and it should not do), I think you have to do some
> > scripting or use some external mysql utility to convert data.
>
> > carlo
>
> > On 21 Giu, 03:09, weheh <richard_gor...@verizon.net> wrote:
>
> > > Now 100% certain about causing reserved keyword conflict with mysql.
> > > Thanks again for the reminder.
>
> > > I successfully migrated the data to mysql from sqlite, but did it 1
> > > table at a time. Is there a convenient way to move all the data from
> > > all tables at once? I figured tar and detar just brings back the
> > > sqlite db, so I didn't try it.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to