Can you please share the tweak that you have made. Because colnames = 
[k[k.index(".")+1:] for k in rows.colnames] this line is returning 
attribute error for me. pydal\helpers\classes.py", line 30, in __getattr__

AttributeError


Please help me 


On Friday, April 25, 2014 at 6:41:38 AM UTC+5:30, Rene Dohmen wrote:
>
> With some tweaking the script that Alan Proposed did work in my situation. 
> (50+ tables and a lot of references)
> https://groups.google.com/d/msg/web2py-developers/QxeJNByj6qc/cpBHsa1ymUkJ
>
> In Short:
> 1) recreate the complete model in postgres: db_new = 
> DAL('postgres://user:pass@localhost/projectname', migrate=settings.migrate, 
> check_reserved=False, entity_quoting=True, bigint_id=True)
> (Still have to find a smart way to get the auth and other tables in there; 
> for now I did it manually)
>
> Let web2py create the empty tables for the db_new postgres table.
>
> 2) Place the sqlite2pg.py in modules/
> (One small modification: I had to remove the line which truncates the 
> table)
>
> 3) Write a controller:
> def migrate():
>     import sqlite2pg
>     sqlite2pg.migrate(db, db_new)
>
> 4) swap db_new and db in you DAL connection file.
>
> Hurray: Working postgres DB with all data. :)
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to