Version 1 (modified by 15 years ago) ( diff ) | ,
---|
Data Migration
- CSV (beware DB locks!)
python web2py.py -S prod -M db.export_to_csv_file(open('db.csv','wb')) Ctrl+D
Remove reference Tables from CSV file (don't want to import duplicates!)python web2py.py -S dev -M db.import_from_csv_file(open('db.csv','rb')) db.commit() Ctrl+D
- Web services (better to avoid locks)
- Currently needs to be done resource by resource (JOINed tables can be done together as Components of main resource)
- need to do referenced tables before the tables which refer to them
- migrate the locations first (using the xml interface), you can later migrate the orgs and offices together (through Component JOIN)
- Ideally we want to develop a way of having all tables loaded together into RAM, refs fixed-up & then imported to db together
- Currently needs to be done resource by resource (JOINed tables can be done together as Components of main resource)
Note:
See TracWiki
for help on using the wiki.