papermerge / documentation

Documentation for Papermerge DMS - Installation, Help, User Manual, REST API
https://docs.papermerge.io
Apache License 2.0
14 stars 6 forks source link

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

Open telsch opened 2 years ago

telsch commented 2 years ago

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 commented 2 years ago

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:

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