g3w-suite/g3w-suite-docker

How to upgrade from 3.3 to 3.4

zanollim opened this issue · 9 comments

When upgrading to 3.4 version I did try to copy and reuse the same postgis DB (volume) from 3.3 version

I get 500 error and in the log of the g3w-suite container I read:

django.db.utils.ProgrammingError: column qdjango_project.order does not exist

so the DB in 3.4 is different (more columns? more tables?), how to upgrade the DB from old 3.3 version?

Did you try to run v3.4 and after did you do a copy of postgis volume?

No, I switched off 3.3 version (docker-compose... down) then copied the 3.3 volume (containing postgis) in a new 3.4 volume folder, then I did run 3.4 version (docker-compose... up -d)

It's strange because it should to apply the new migrations.
Did you copy entire WEBGIS_DOCKER_SHARED_VOLUME?

Yes the entire WEBGIS_DOCKER_SHARED_VOLUME, containing the css customizations, the QGIS projects, the jpg images and the '11' postgis folder

Ok try this:
enter into g3w-suite main container:

docker exec -it g3w-suite-docker_g3w-suite_1 bash

print:

export DISPLAY=:99
cd g3w-admin
python3 manage.py migrate

Here the output of the command:

Running migrations: Applying qdjango.0092_layeracl...Traceback (most recent call last): File "/usr/local/lib/python3.8/dist-packages/django/db/backends/utils.py", line 82, in _execute return self.cursor.execute(sql) psycopg2.errors.DuplicateTable: relation "qdjango_layeracl" already exists

I found the problem. Two identical db migrations in the version 3.3 and 3.4 but in different execution times. I'm going to make a fix for it in v. 3.4

@zanollim it should be fixed with g3w-suite/g3w-admin@1a4b2b7. Please try again.

Thanks @wlorenzetti
I confirm, upgrade correctly done!
Now I can test your new improved features :)