Transferring the whole database from a python 2.7 framework to 3.11 framework

55 views
Skip to first unread message

mostwanted

unread,
May 22, 2024, 3:29:02 AMMay 22
to web2py-users
Hi guys, my app has been running on python2.7 since its inception, I have been reluctant to make the big change but now very critical updates a force the change. How do I move the entire database with all its images and data to the new app?

I have tried a few things and a few things, The appadmin interface import function is not working so I had to write a few scripts. Some tables without references were successful but I am stuck on bigger tables with images and table references I keep getting primarykey integrity error.

Please help

Regards

villas

unread,
May 30, 2024, 8:02:36 AMMay 30
to web2py-users
There is not enough information here, but this seems like a DB problem rather than a web2py code error. 
You do not mention which DB.
It is not clear why you are re-building or importing to new tables etc.
When I upgraded (years ago),  I do not recall touching my DB at all (Firebird).

Leonel Câmara

unread,
Jun 27, 2024, 9:23:45 AM (6 days ago) Jun 27
to web2py-users
You probably only need to do a fake migration after changing python version and clearing your sessions folder.

python ./web2py.py -S yourapp -M --force_migrate -D DEBUG --fake_migrate

The only incompatibilities are things that were pickled.
Reply all
Reply to author
Forward
0 new messages