Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to migrate from latest stable 2.0.1 to 2.1-dev #8

Open
telsch opened this issue Jul 31, 2022 · 1 comment
Open

how to migrate from latest stable 2.0.1 to 2.1-dev #8

telsch opened this issue Jul 31, 2022 · 1 comment
Assignees
Labels
documentation Improvements or additions to documentation migration from 2.0 to 2.1

Comments

@telsch
Copy link

telsch commented Jul 31, 2022

Upgrading only describes how to upgrade from 1.5.x to 2.x

In example docker-compose.yml database also changed from sqlite3 to postgres. If i manually backup from 2.0.1 sqlite3
python manage.py dumpdata --exclude=contenttypes > backup.json

and then try to restore in 2.1-dev with postgres
python manage.py loaddata backup.json

i got this error
Traceback (most recent call last): File "/venv/lib/python3.9/site-packages/django/db/models/options.py", line 608, in get_field return self.fields_map[field_name] KeyError: 'file_name'

Which database migrations needs to be applied before to be able to update?

@ciur
Copy link
Member

ciur commented Jul 31, 2022

Migration from 2.0 to 2.1 is more complex than running database migrations.
There are changes in how files are stored/read on local file system as well.

For example:

  • 2.0 stores OCRed data as two files per page: one jpeg + one hocr
  • 2.1 stores OCRed data as one single file per page: svg file with embbeded jpeg

For this ticket I will do following actions:

  1. Document relevant changes (relevant for migration document existing documents stored in 2.0) changes between version
  2. Implement a small, command line utility, as installable python package, which interactively help with migration

@ciur ciur added documentation Improvements or additions to documentation migration from 2.0 to 2.1 labels Jul 31, 2022
@ciur ciur self-assigned this Jul 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation migration from 2.0 to 2.1
Projects
None yet
Development

No branches or pull requests

2 participants