Closed violoncelloCH closed 6 months ago
same here
You need to update the PostgreSQL to version 15: https://community.penpot.app/t/how-to-upgrade-postgresql-version-in-docker-container/2104
In my docker-compose.yml the PostgreSQL version was still 13, which does not support the syntax in the upgrade file.
thanks! I'll try that... would be great though if this would have been stated in the upgrade notes on https://help.penpot.app/technical-guide/getting-started/#update-penpot-1
You need to update the PostgreSQL to version 15: https://community.penpot.app/t/how-to-upgrade-postgresql-version-in-docker-container/2104
that worked for me - thx for the hint!
Hi @violoncelloCH,
Could you confirm that you were able to address this issue?
Hi @madalenapmelo-kp thanks for asking ! I was not quick enough since I'm only running this Penpot instance in my free time :D Looked at it this evening and managed to update first Postgres and then Penpot to v2 sucessfully! (thanks @MDXDave) Regarding this issue, I still think it would make sense to have a quick note about the required Postgres version and a reference to https://community.penpot.app/t/how-to-upgrade-postgresql-version-in-docker-container/2104 either in the documentation in the upgrade to v2 section or in the changelog. Thanks for considering this :)
Hi @violoncelloCH,
Thank you for confirming!
I've created an issue in the penpot-docs repository with this feedback so that we can look into adding this information to our documentation :slightly_smiling_face:
Steps To Reproduce
Expected behavior
migration to v2 works without error
Actual behavior
the migration fails and the backend exits. extract of the error log:
Screenshots or video
No response
Desktop (please complete the following information)
No response
Smartphone (please complete the following information)
No response
Environment (please complete the following information)
selhosted using docker-compose
docker-compose.yml
``` --- version: "3.5" networks: penpot: services: penpot-frontend: image: "penpotapp/frontend:latest" ports: - 9001:80 volumes: - ./data/penpot:/opt/data # - ./config.js:/var/www/app/js/config.js env_file: - config.env environment: ## Default configuration for assets storage: using filesystem based with all files ## stored in a docker volume. - PENPOT_ASSETS_STORAGE_BACKEND=assets-fs - PENPOT_STORAGE_ASSETS_FS_DIRECTORY=/opt/data/assets depends_on: - penpot-backend - penpot-exporter networks: - penpot penpot-backend: image: "penpotapp/backend:latest" volumes: - ./data/penpot:/opt/data depends_on: - penpot-postgres - penpot-redis env_file: - config.env environment: ## Default configuration for assets storage: using filesystem based with all files ## stored in a docker volume. - PENPOT_ASSETS_STORAGE_BACKEND=assets-fs - PENPOT_STORAGE_ASSETS_FS_DIRECTORY=/opt/data/assets networks: - penpot penpot-exporter: image: "penpotapp/exporter:latest" env_file: - config.env environment: # Don't touch it; this uses internal docker network to # communicate with the frontend. - PENPOT_PUBLIC_URI=http://penpot-frontend networks: - penpot penpot-postgres: image: "postgres:13" restart: always stop_signal: SIGINT environment: - POSTGRES_INITDB_ARGS=--data-checksums - POSTGRES_DB=penpot - POSTGRES_USER=penpot - POSTGRES_PASSWORD=Frontend Stack Trace
No response
Backend Stack Trace
stack trace
``` penpot-penpot-backend-1 | [2024-04-13 19:27:35.537] I app.migrations - hint="running migrations", module=:app.migrations/migrations penpot-penpot-backend-1 | [2024-04-13 19:27:35.650] I app.util.migrations - action="apply migration", module="main", name="0105-mod-file-change-table" penpot-penpot-backend-1 | [2024-04-13 19:27:35.660] I app.util.migrations - action="apply migration", module="main", name="0106-add-file-tagged-object-thumbnail-table" penpot-penpot-backend-1 | [2024-04-13 19:27:35.673] I app.util.migrations - action="apply migration", module="main", name="0106-mod-team-table" penpot-penpot-backend-1 | [2024-04-13 19:27:35.674] I app.util.migrations - action="apply migration", module="main", name="0107-mod-file-tagged-object-thumbnail-table" penpot-penpot-backend-1 | [2024-04-13 19:27:35.679] I app.util.migrations - action="apply migration", module="main", name="0107-add-deletion-protection-trigger-function" penpot-penpot-backend-1 | [2024-04-13 19:27:35.685] I app.util.migrations - action="apply migration", module="main", name="0108-mod-file-thumbnail-table" penpot-penpot-postgres-1 | 2024-04-13 19:27:35.698 UTC [34] ERROR: syntax error at or near "TRIGGER" at character 49 penpot-penpot-postgres-1 | 2024-04-13 19:27:35.698 UTC [34] STATEMENT: penpot-penpot-postgres-1 | penpot-penpot-postgres-1 | --- Add deletion protection penpot-penpot-postgres-1 | CREATE OR REPLACE TRIGGER deletion_protection__tgr penpot-penpot-postgres-1 | BEFORE DELETE ON file_thumbnail FOR EACH STATEMENT penpot-penpot-postgres-1 | WHEN ((current_setting('rules.deletion_protection', true) IN ('on', '')) OR penpot-penpot-postgres-1 | (current_setting('rules.deletion_protection', true) IS NULL)) penpot-penpot-postgres-1 | EXECUTE PROCEDURE raise_deletion_protection() penpot-penpot-backend-1 | ==== ERROR ==== penpot-penpot-backend-1 | clojure.lang.ExceptionInfo: Error on key :app.migrations/migrations when building system {:reason :integrant.core/build-threw-exception, :system {:app.auth.oidc.providers/github nil, :app.db/pool #object[com.zaxxer.hikari.HikariDataSource 0x7e3ccc85 "HikariDataSource (main)"], :app.auth.oidc.providers/gitlab {:base-uri "https://git.selfhosted.redacted", :client-id "Additional context
No response