geonode
geonode copied to clipboard
Missing manglers for database restore from 3.3.x to 4.x
Expected Behavior
Performing a backup on version 3.3.x will dump fixture data with the schema of 3.3.x. When restoring the backup on a geonode server at master@a42f9f2426de444d51ab12046452893679d5803f, manglers are available that transform data on 3.3.x schema to 4.x schema. Such manglers exist for version 2.0 to 2.4.
Actual Behavior
Restoring a backup from version 3.3.x on a version 4.x raises an exception when trying to add columns that are not on the 4.x schema, for example:
INFO 2024-01-02 22:45:57,533 - restoring '/opt/db_recovery/unzip_2024-01-01_224607_47c5/2024-01-01_224607/base.json'
WARNING 2024-01-02 22:45:58,506 No valid fixture data found for 'base'
Traceback (most recent call last):
File "/home/geonode/venv/geonode-4-master-py311/lib/python3.11/site-packages/django/db/models/options.py", line 608, in get_field
return self.fields_map[field_name]
~~~~~~~~~~~~~~~^^^^^^^^^^^^
KeyError: 'detail_url'
As there are no available manglers, fixture data from 3.3.x cannot be imported into 4.x. Those manglers are available for version 2.0 to 2.4.
Steps to Reproduce the Problem
- create a backup of geonode server at version 3.3.x
- restore the backup on a geonode server at version master@a42f9f2426de444d51ab12046452893679d5803f (4.x)
Specifications
- GeoNode version: master@a42f9f2426de444d51ab12046452893679d5803f
- Installation type (vanilla, geonode-project): vanilla
- Installation method (manual, docker): manual
- Platform: Almalinux 9.3