penpot / penpot

Penpot: The open-source design tool for design and code collaboration
https://penpot.app
Mozilla Public License 2.0
33.7k stars 1.7k forks source link

bug: v2 migration postgresql error #4434

Closed violoncelloCH closed 6 months ago

violoncelloCH commented 7 months ago

Steps To Reproduce

  1. have a running penpot v1.19.3 instance
  2. pull the new image for v2 as described in https://help.penpot.app/technical-guide/getting-started/#update-penpot-1
  3. start the new container
  4. observe crash in the logs, backend exiting

Expected behavior

migration to v2 works without error

Actual behavior

the migration fails and the backend exits. extract of the error log:

penpot-backend_1   | [2024-04-13 19:00:00.758] I app.migrations - hint="running migrations", module=:app.migrations/migrations
penpot-backend_1   | [2024-04-13 19:00:00.874] I app.util.migrations - action="apply migration", module="main", name="0105-mod-file-change-table"
penpot-backend_1   | [2024-04-13 19:00:00.883] I app.util.migrations - action="apply migration", module="main", name="0106-add-file-tagged-object-thumbnail-table"
penpot-backend_1   | [2024-04-13 19:00:00.896] I app.util.migrations - action="apply migration", module="main", name="0106-mod-team-table"
penpot-backend_1   | [2024-04-13 19:00:00.897] I app.util.migrations - action="apply migration", module="main", name="0107-mod-file-tagged-object-thumbnail-table"
penpot-backend_1   | [2024-04-13 19:00:00.903] I app.util.migrations - action="apply migration", module="main", name="0107-add-deletion-protection-trigger-function"
penpot-backend_1   | [2024-04-13 19:00:00.905] I app.util.migrations - action="apply migration", module="main", name="0108-mod-file-thumbnail-table"
penpot-postgres_1  | 2024-04-13 19:00:00.917 UTC [35] ERROR:  syntax error at or near "TRIGGER" at character 49
penpot-postgres_1  | 2024-04-13 19:00:00.917 UTC [35] STATEMENT:  
penpot-postgres_1  |    
penpot-postgres_1  |    --- Add deletion protection
penpot-postgres_1  |    CREATE OR REPLACE TRIGGER deletion_protection__tgr
penpot-postgres_1  |    BEFORE DELETE ON file_thumbnail FOR EACH STATEMENT
penpot-postgres_1  |      WHEN ((current_setting('rules.deletion_protection', true) IN ('on', '')) OR
penpot-postgres_1  |            (current_setting('rules.deletion_protection', true) IS NULL))
penpot-postgres_1  |      EXECUTE PROCEDURE raise_deletion_protection()
penpot-backend_1   | ==== ERROR ====
penpot-backend_1   | clojure.lang.ExceptionInfo: Error on key :app.migrations/migrations when building system

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= volumes: - ./data/postgres:/var/lib/postgresql/data networks: - penpot penpot-redis: image: redis:6 restart: always networks: - penpot ```

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 "", :client-secret "", :scopes #{"profile" "email" "openid"}, :auth-uri "https://git.selfhosted.redacted/oauth/authorize", :token-uri "https://git.selfhosted.redacted/oauth/token", :user-uri "https://git.selfhosted.redacted/oauth/userinfo", :name "gitlab"}, :app.http.client/client #object[jdk.internal.net.http.HttpClientFacade 0x1afad304 "jdk.internal.net.http.HttpClientImpl@4bbe476d(1)"], :app.auth.oidc.providers/generic nil, :app.auth.oidc.providers/google nil, :app.http.session/manager #object[app.http.session$database_manager$reify__22066 0xbf7bfaa "app.http.session$database_manager$reify__22066@bf7bfaa"], :app.metrics/metrics #:app.metrics{:handler #function[clojure.core/partial/fn--5920], :definitions {:session-update-total {:app.metrics.definition/name "penpot_http_session_update_total", :app.metrics.definition/help "A counter of session update batch events.", :app.metrics.definition/type :counter, :app.metrics/registry #object[io.prometheus.client.CollectorRegistry 0x41a3248e "io.prometheus.client.CollectorRegistry@41a3248e"], :app.metrics.definition/instance #object[io.prometheus.client.Counter 0x5c57bc39 "io.prometheus.client.Counter@5c57bc39"]}, :audit-http-handler-concurrency {:app.metrics.definition/name "penpot_audit_http_handler_concurrency", :app.metrics.definition/help "Current number of used concurrency capacity on the audit log http handler", :app.metrics.definition/labels [], :app.metrics.definition/type :gauge, :app.metrics/registry #object[io.prometheus.client.CollectorRegistry 0x41a3248e "io.prometheus.client.CollectorRegistry@41a3248e"], :app.metrics.definition/instance #object[io.prometheus.client.Gauge 0x40131e3f "io.prometheus.client.Gauge@40131e3f"]}, :rpc-climit-queue {:app.metrics.definition/name "penpot_rpc_climit_queue", :app.metrics.definition/help "Current number of queued submissions.", :app.metrics.definition/labels ["name"], :app.metrics.definition/type :gauge, :app.metrics/registry #object[io.prometheus.client.CollectorRegistry 0x41a3248e "io.prometheus.client.CollectorRegistry@41a3248e"], :app.metrics.definition/instance #object[io.prometheus.client.Gauge 0x113d85da "io.prometheus.client.Gauge@113d85da"]}, :update-file-changes {:app.metrics.definition/name "penpot_rpc_update_file_changes_total", :app.metrics.definition/help "A total number of changes submitted to update-file.", :app.metrics.definition/type :counter, :app.metrics/registry #object[io.prometheus.client.CollectorRegistry 0x41a3248e "io.prometheus.client.CollectorRegistry@41a3248e"], :app.metrics.definition/instance #object[io.prometheus.client.Counter 0x1cbe4346 "io.prometheus.client.Counter@1cbe4346"]}, :rpc-query-timing {:app.metrics.definition/name "penpot_rpc_query_timing", :app.metrics.definition/help "RPC query method call timing.", :app.metrics.definition/labels ["name"], :app.metrics.definition/type :histogram, :app.metrics/registry #object[io.prometheus.client.CollectorRegistry 0x41a3248e "io.prometheus.client.CollectorRegistry@41a3248e"], :app.metrics.definition/instance #object[io.prometheus.client.Histogram 0x2749700 "io.prometheus.client.Histogram@2749700"]}, :websocket-session-timing {:app.metrics.definition/name "penpot_websocket_session_timing", :app.metrics.definition/help "Websocket session timing (seconds).", :app.metrics.definition/type :summary, :app.metrics/registry #object[io.prometheus.client.CollectorRegistry 0x41a3248e "io.prometheus.client.CollectorRegistry@41a3248e"], :app.metrics.definition/instance #object[io.prometheus.client.Summary 0x688c9002 "io.prometheus.client.Summary@688c9002"]}, :rpc-climit-timing {:app.metrics.definition/name "penpot_rpc_climit_timing", :app.metrics.definition/help "Summary of the time between queuing and executing on the CLIMIT", :app.metrics.definition/labels ["name"], :app.metrics.definition/type :summary, :app.metrics/registry #object[io.prometheus.client.CollectorRegistry 0x41a3248e "io.prometheus.client.CollectorRegistry@41a3248e"], :app.metrics.definition/instance #object[io.prometheus.client.Summary 0x1d6f14ad "io.prometheus.client.Summary@1d6f14ad"]}, :executors-completed-tasks {:app.metrics.definition/name "penpot_executors_completed_tasks_total", :app.metrics.definition/help "Approximate number of completed tasks by the executor.", :app.metrics.definition/labels ["name"], :app.metrics.definition/type :counter, :app.metrics/registry #object[io.prometheus.client.CollectorRegistry 0x41a3248e "io.prometheus.client.CollectorRegistry@41a3248e"], :app.metrics.definition/instance #object[io.prometheus.client.Counter 0x45d5e172 "io.prometheus.client.Counter@45d5e172"]}, :executors-active-threads {:app.metrics.definition/name "penpot_executors_active_threads", :app.metrics.definition/help "Current number of threads available in the executor service.", :app.metrics.definition/labels ["name"], :app.metrics.definition/type :gauge, :app.metrics/registry #object[io.prometheus.client.CollectorRegistry 0x41a3248e "io.prometheus.client.CollectorRegistry@41a3248e"], :app.metrics.definition/instance #object[io.prometheus.client.Gauge 0x4e689e73 "io.prometheus.client.Gauge@4e689e73"]}, :executors-running-threads {:app.metrics.definition/name "penpot_executors_running_threads", :app.metrics.definition/help "Current number of threads with state RUNNING.", :app.metrics.definition/labels ["name"], :app.metrics.definition/type :gauge, :app.metrics/registry #object[io.prometheus.client.CollectorRegistry 0x41a3248e "io.prometheus.client.CollectorRegistry@41a3248e"], :app.metrics.definition/instance #object[io.prometheus.client.Gauge 0x42681b3c "io.prometheus.client.Gauge@42681b3c"]}, :rpc-climit-permits {:app.metrics.definition/name "penpot_rpc_climit_permits", :app.metrics.definition/help "Current number of available permits", :app.metrics.definition/labels ["name"], :app.metrics.definition/type :gauge, :app.metrics/registry #object[io.prometheus.client.CollectorRegistry 0x41a3248e "io.prometheus.client.CollectorRegistry@41a3248e"], :app.metrics.definition/instance #object[io.prometheus.client.Gauge 0x27c7a5a0 "io.prometheus.client.Gauge@27c7a5a0"]}, :update-file-bytes-processed {:app.metrics.definition/name "penpot_rpc_update_file_bytes_processed_total", :app.metrics.definition/help "A total number of bytes processed by update-file.", :app.metrics.definition/type :counter, :app.metrics/registry #object[io.prometheus.client.CollectorRegistry 0x41a3248e "io.prometheus.client.CollectorRegistry@41a3248e"], :app.metrics.definition/instance #object[io.prometheus.client.Counter 0x4df30e5b "io.prometheus.client.Counter@4df30e5b"]}, :rpc-command-timing {:app.metrics.definition/name "penpot_rpc_command_timing", :app.metrics.definition/help "RPC command method call timing.", :app.metrics.definition/labels ["name"], :app.metrics.definition/type :histogram, :app.metrics/registry #object[io.prometheus.client.CollectorRegistry 0x41a3248e "io.prometheus.client.CollectorRegistry@41a3248e"], :app.metrics.definition/instance #object[io.prometheus.client.Histogram 0x47628a90 "io.prometheus.client.Histogram@47628a90"]}, :websocket-messages-total {:app.metrics.definition/name "penpot_websocket_message_total", :app.metrics.definition/help "Counter of processed messages.", :app.metrics.definition/labels ["op"], :app.metrics.definition/type :counter, :app.metrics/registry #object[io.prometheus.client.CollectorRegistry 0x41a3248e "io.prometheus.client.CollectorRegistry@41a3248e"], :app.metrics.definition/instance #object[io.prometheus.client.Counter 0x45d1d8bb "io.prometheus.client.Counter@45d1d8bb"]}, :audit-http-handler-timing {:app.metrics.definition/name "penpot_audit_http_handler_timing", :app.metrics.definition/help "Summary of the time between queuing and executing on the audit log http handler", :app.metrics.definition/labels [], :app.metrics.definition/type :summary, :app.metrics/registry #object[io.prometheus.client.CollectorRegistry 0x41a3248e "io.prometheus.client.CollectorRegistry@41a3248e"], :app.metrics.definition/instance #object[io.prometheus.client.Summary 0x5f218f04 "io.prometheus.client.Summary@5f218f04"]}, :redis-eval-timing {:app.metrics.definition/name "penpot_redis_eval_timing", :app.metrics.definition/help "Redis EVAL commands execution timings (ms)", :app.metrics.definition/labels ["name"], :app.metrics.definition/type :summary, :app.metrics/registry #object[io.prometheus.client.CollectorRegistry 0x41a3248e "io.prometheus.client.CollectorRegistry@41a3248e"], :app.metrics.definition/instance #object[io.prometheus.client.Summary 0xaf5c36d "io.prometheus.client.Summary@af5c36d"]}, :audit-http-handler-queue-size {:app.metrics.definition/name "penpot_audit_http_handler_queue_size", :app.metrics.definition/help "Current number of queued submissions on the audit log http handler", :app.metrics.definition/labels [], :app.metrics.definition/type :gauge, :app.metrics/registry #object[io.prometheus.client.CollectorRegistry 0x41a3248e "io.prometheus.client.CollectorRegistry@41a3248e"], :app.metrics.definition/instance #object[io.prometheus.client.Gauge 0x5910eea9 "io.prometheus.client.Gauge@5910eea9"]}, :tasks-timing {:app.metrics.definition/name "penpot_tasks_timing", :app.metrics.definition/help "Background tasks timing (milliseconds).", :app.metrics.definition/labels ["name"], :app.metrics.definition/type :summary, :app.metrics/registry #object[io.prometheus.client.CollectorRegistry 0x41a3248e "io.prometheus.client.CollectorRegistry@41a3248e"], :app.metrics.definition/instance #object[io.prometheus.client.Summary 0x124ff130 "io.prometheus.client.Summary@124ff130"]}, :websocket-active-connections {:app.metrics.definition/name "penpot_websocket_active_connections", :app.metrics.definition/help "Active websocket connections gauge", :app.metrics.definition/type :gauge, :app.metrics/registry #object[io.prometheus.client.CollectorRegistry 0x41a3248e "io.prometheus.client.CollectorRegistry@41a3248e"], :app.metrics.definition/instance #object[io.prometheus.client.Gauge 0x41c505d2 "io.prometheus.client.Gauge@41c505d2"]}, :rpc-mutation-timing {:app.metrics.definition/name "penpot_rpc_mutation_timing", :app.metrics.definition/help "RPC mutation method call timing.", :app.metrics.definition/labels ["name"], :app.metrics.definition/type :histogram, :app.metrics/registry #object[io.prometheus.client.CollectorRegistry 0x41a3248e "io.prometheus.client.CollectorRegistry@41a3248e"], :app.metrics.definition/instance #object[io.prometheus.client.Histogram 0x650f582c "io.prometheus.client.Histogram@650f582c"]}}, :registry #object[io.prometheus.client.CollectorRegistry 0x41a3248e "io.prometheus.client.CollectorRegistry@41a3248e"]}, :app.auth.ldap/provider nil}, :function #multifn[init-key 0xaa3a0ba], :key :app.migrations/migrations, :value #:app.db{:pool #object[com.zaxxer.hikari.HikariDataSource 0x7e3ccc85 "HikariDataSource (main)"]}} penpot-penpot-backend-1 | at integrant.core$build_exception.invokeStatic(core.cljc:296) penpot-penpot-backend-1 | at integrant.core$build_exception.invoke(core.cljc:295) penpot-penpot-backend-1 | at integrant.core$try_build_action.invokeStatic(core.cljc:307) penpot-penpot-backend-1 | at integrant.core$try_build_action.invoke(core.cljc:304) penpot-penpot-backend-1 | at integrant.core$build_key.invokeStatic(core.cljc:313) penpot-penpot-backend-1 | at integrant.core$build_key.invoke(core.cljc:309) penpot-penpot-backend-1 | at clojure.core$partial$fn__5924.invoke(core.clj:2656) penpot-penpot-backend-1 | at clojure.core.protocols$fn__8263.invokeStatic(protocols.clj:168) penpot-penpot-backend-1 | at clojure.core.protocols$fn__8263.invoke(protocols.clj:124) penpot-penpot-backend-1 | at clojure.core.protocols$fn__8218$G__8213__8227.invoke(protocols.clj:19) penpot-penpot-backend-1 | at clojure.core.protocols$seq_reduce.invokeStatic(protocols.clj:31) penpot-penpot-backend-1 | at clojure.core.protocols$fn__8250.invokeStatic(protocols.clj:75) penpot-penpot-backend-1 | at clojure.core.protocols$fn__8250.invoke(protocols.clj:75) penpot-penpot-backend-1 | at clojure.core.protocols$fn__8192$G__8187__8205.invoke(protocols.clj:13) penpot-penpot-backend-1 | at clojure.core$reduce.invokeStatic(core.clj:6908) penpot-penpot-backend-1 | at clojure.core$reduce.invoke(core.clj:6890) penpot-penpot-backend-1 | at integrant.core$build.invokeStatic(core.cljc:337) penpot-penpot-backend-1 | at integrant.core$build.invoke(core.cljc:316) penpot-penpot-backend-1 | at integrant.core$init.invokeStatic(core.cljc:445) penpot-penpot-backend-1 | at integrant.core$init.invoke(core.cljc:437) penpot-penpot-backend-1 | at integrant.core$init.invokeStatic(core.cljc:442) penpot-penpot-backend-1 | at integrant.core$init.invoke(core.cljc:437) penpot-penpot-backend-1 | at app.main$start$fn__44846.invoke(main.clj:525) penpot-penpot-backend-1 | at clojure.lang.AFn.applyToHelper(AFn.java:154) penpot-penpot-backend-1 | at clojure.lang.AFn.applyTo(AFn.java:144) penpot-penpot-backend-1 | at clojure.lang.Var.alterRoot(Var.java:310) penpot-penpot-backend-1 | at clojure.core$alter_var_root.invokeStatic(core.clj:5549) penpot-penpot-backend-1 | at clojure.core$alter_var_root.doInvoke(core.clj:5544) penpot-penpot-backend-1 | at clojure.lang.RestFn.invoke(RestFn.java:428) penpot-penpot-backend-1 | at app.main$start.invokeStatic(main.clj:519) penpot-penpot-backend-1 | at app.main$start.invoke(main.clj:516) penpot-penpot-backend-1 | at app.main$_main.invokeStatic(main.clj:585) penpot-penpot-backend-1 | at app.main$_main.doInvoke(main.clj:577) penpot-penpot-backend-1 | at clojure.lang.RestFn.invoke(RestFn.java:400) penpot-penpot-backend-1 | at clojure.lang.AFn.applyToHelper(AFn.java:152) penpot-penpot-backend-1 | at clojure.lang.RestFn.applyTo(RestFn.java:135) penpot-penpot-backend-1 | at clojure.lang.Var.applyTo(Var.java:707) penpot-penpot-backend-1 | at clojure.core$apply.invokeStatic(core.clj:667) penpot-penpot-backend-1 | at clojure.main$main_opt.invokeStatic(main.clj:515) penpot-penpot-backend-1 | at clojure.main$main_opt.invoke(main.clj:511) penpot-penpot-backend-1 | at clojure.main$main.invokeStatic(main.clj:665) penpot-penpot-backend-1 | at clojure.main$main.doInvoke(main.clj:617) penpot-penpot-backend-1 | at clojure.lang.RestFn.applyTo(RestFn.java:140) penpot-penpot-backend-1 | at clojure.lang.Var.applyTo(Var.java:707) penpot-penpot-backend-1 | at clojure.main.main(main.java:40) penpot-penpot-backend-1 | Caused by: org.postgresql.util.PSQLException: ERROR: syntax error at or near "TRIGGER" penpot-penpot-backend-1 | Position: 49 penpot-penpot-backend-1 | at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2712) penpot-penpot-backend-1 | at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2400) penpot-penpot-backend-1 | at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:367) penpot-penpot-backend-1 | at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:498) penpot-penpot-backend-1 | at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:415) penpot-penpot-backend-1 | at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:190) penpot-penpot-backend-1 | at org.postgresql.jdbc.PgPreparedStatement.execute(PgPreparedStatement.java:177) penpot-penpot-backend-1 | at com.zaxxer.hikari.pool.ProxyPreparedStatement.execute(ProxyPreparedStatement.java:44) penpot-penpot-backend-1 | at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.execute(HikariProxyPreparedStatement.java) penpot-penpot-backend-1 | at next.jdbc.result_set$stmt__GT_result_set.invokeStatic(result_set.clj:667) penpot-penpot-backend-1 | at next.jdbc.result_set$stmt__GT_result_set.invoke(result_set.clj:662) penpot-penpot-backend-1 | at next.jdbc.result_set$eval16877$fn__16885.invoke(result_set.clj:895) penpot-penpot-backend-1 | at next.jdbc.protocols$eval16162$fn__16178$G__16153__16187.invoke(protocols.clj:34) penpot-penpot-backend-1 | at next.jdbc$execute_BANG_.invokeStatic(jdbc.clj:254) penpot-penpot-backend-1 | at next.jdbc$execute_BANG_.invoke(jdbc.clj:241) penpot-penpot-backend-1 | at app.util.migrations$resource$fn__45172.invoke(migrations.clj:81) penpot-penpot-backend-1 | at app.util.migrations$impl_migrate_single.invokeStatic(migrations.clj:41) penpot-penpot-backend-1 | at app.util.migrations$impl_migrate_single.invoke(migrations.clj:36) penpot-penpot-backend-1 | at app.util.migrations$impl_migrate$fn__45135$fn__45136.invoke(migrations.clj:49) penpot-penpot-backend-1 | at clojure.core$run_BANG_$fn__8906.invoke(core.clj:7849) penpot-penpot-backend-1 | at clojure.lang.PersistentVector$ChunkedSeq.reduce(PersistentVector.java:485) penpot-penpot-backend-1 | at clojure.core$reduce.invokeStatic(core.clj:6907) penpot-penpot-backend-1 | at clojure.core$run_BANG_.invokeStatic(core.clj:7844) penpot-penpot-backend-1 | at clojure.core$run_BANG_.invoke(core.clj:7844) penpot-penpot-backend-1 | at app.util.migrations$impl_migrate$fn__45135.invoke(migrations.clj:49) penpot-penpot-backend-1 | at next.jdbc.transaction$transact_STAR_.invokeStatic(transaction.clj:72) penpot-penpot-backend-1 | at next.jdbc.transaction$transact_STAR_.invoke(transaction.clj:51) penpot-penpot-backend-1 | at next.jdbc.transaction$eval17754$fn__17755.invoke(transaction.clj:126) penpot-penpot-backend-1 | at next.jdbc.protocols$eval16252$fn__16253$G__16243__16262.invoke(protocols.clj:58) penpot-penpot-backend-1 | at next.jdbc$transact.invokeStatic(jdbc.clj:423) penpot-penpot-backend-1 | at next.jdbc$transact.invoke(jdbc.clj:415) penpot-penpot-backend-1 | at app.util.migrations$impl_migrate.invokeStatic(migrations.clj:48) penpot-penpot-backend-1 | at app.util.migrations$impl_migrate.invoke(migrations.clj:43) penpot-penpot-backend-1 | at app.util.migrations$migrate_BANG_.invokeStatic(migrations.clj:70) penpot-penpot-backend-1 | at app.util.migrations$migrate_BANG_.invoke(migrations.clj:67) penpot-penpot-backend-1 | at app.migrations$apply_migrations_BANG_.invokeStatic(migrations.clj:388) penpot-penpot-backend-1 | at app.migrations$apply_migrations_BANG_.invoke(migrations.clj:384) penpot-penpot-backend-1 | at app.migrations$eval45192$fn__45194.invoke(migrations.clj:398) penpot-penpot-backend-1 | at clojure.lang.MultiFn.invoke(MultiFn.java:234) penpot-penpot-backend-1 | at integrant.core$try_build_action.invokeStatic(core.cljc:305) penpot-penpot-backend-1 | ... 42 more penpot-penpot-backend-1 | ==== CAUSE ==== penpot-penpot-backend-1 | org.postgresql.util.PSQLException: ERROR: syntax error at or near "TRIGGER" penpot-penpot-backend-1 | Position: 49 penpot-penpot-backend-1 | at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2712) penpot-penpot-backend-1 | at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2400) penpot-penpot-backend-1 | at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:367) penpot-penpot-backend-1 | at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:498) penpot-penpot-backend-1 | at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:415) penpot-penpot-backend-1 | at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:190) penpot-penpot-backend-1 | at org.postgresql.jdbc.PgPreparedStatement.execute(PgPreparedStatement.java:177) penpot-penpot-backend-1 | at com.zaxxer.hikari.pool.ProxyPreparedStatement.execute(ProxyPreparedStatement.java:44) penpot-penpot-backend-1 | at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.execute(HikariProxyPreparedStatement.java) penpot-penpot-backend-1 | at next.jdbc.result_set$stmt__GT_result_set.invokeStatic(result_set.clj:667) penpot-penpot-backend-1 | at next.jdbc.result_set$stmt__GT_result_set.invoke(result_set.clj:662) penpot-penpot-backend-1 | at next.jdbc.result_set$eval16877$fn__16885.invoke(result_set.clj:895) penpot-penpot-backend-1 | at next.jdbc.protocols$eval16162$fn__16178$G__16153__16187.invoke(protocols.clj:34) penpot-penpot-backend-1 | at next.jdbc$execute_BANG_.invokeStatic(jdbc.clj:254) penpot-penpot-backend-1 | at next.jdbc$execute_BANG_.invoke(jdbc.clj:241) penpot-penpot-backend-1 | at app.util.migrations$resource$fn__45172.invoke(migrations.clj:81) penpot-penpot-backend-1 | at app.util.migrations$impl_migrate_single.invokeStatic(migrations.clj:41) penpot-penpot-backend-1 | at app.util.migrations$impl_migrate_single.invoke(migrations.clj:36) penpot-penpot-backend-1 | at app.util.migrations$impl_migrate$fn__45135$fn__45136.invoke(migrations.clj:49) penpot-penpot-backend-1 | at clojure.core$run_BANG_$fn__8906.invoke(core.clj:7849) penpot-penpot-backend-1 | at clojure.lang.PersistentVector$ChunkedSeq.reduce(PersistentVector.java:485) penpot-penpot-backend-1 | at clojure.core$reduce.invokeStatic(core.clj:6907) penpot-penpot-backend-1 | at clojure.core$run_BANG_.invokeStatic(core.clj:7844) penpot-penpot-backend-1 | at clojure.core$run_BANG_.invoke(core.clj:7844) penpot-penpot-backend-1 | at app.util.migrations$impl_migrate$fn__45135.invoke(migrations.clj:49) penpot-penpot-backend-1 | at next.jdbc.transaction$transact_STAR_.invokeStatic(transaction.clj:72) penpot-penpot-backend-1 | at next.jdbc.transaction$transact_STAR_.invoke(transaction.clj:51) penpot-penpot-backend-1 | at next.jdbc.transaction$eval17754$fn__17755.invoke(transaction.clj:126) penpot-penpot-backend-1 | at next.jdbc.protocols$eval16252$fn__16253$G__16243__16262.invoke(protocols.clj:58) penpot-penpot-backend-1 | at next.jdbc$transact.invokeStatic(jdbc.clj:423) penpot-penpot-backend-1 | at next.jdbc$transact.invoke(jdbc.clj:415) penpot-penpot-backend-1 | at app.util.migrations$impl_migrate.invokeStatic(migrations.clj:48) penpot-penpot-backend-1 | at app.util.migrations$impl_migrate.invoke(migrations.clj:43) penpot-penpot-backend-1 | at app.util.migrations$migrate_BANG_.invokeStatic(migrations.clj:70) penpot-penpot-backend-1 | at app.util.migrations$migrate_BANG_.invoke(migrations.clj:67) penpot-penpot-backend-1 | at app.migrations$apply_migrations_BANG_.invokeStatic(migrations.clj:388) penpot-penpot-backend-1 | at app.migrations$apply_migrations_BANG_.invoke(migrations.clj:384) penpot-penpot-backend-1 | at app.migrations$eval45192$fn__45194.invoke(migrations.clj:398) penpot-penpot-backend-1 | at clojure.lang.MultiFn.invoke(MultiFn.java:234) penpot-penpot-backend-1 | at integrant.core$try_build_action.invokeStatic(core.cljc:305) penpot-penpot-backend-1 | at integrant.core$try_build_action.invoke(core.cljc:304) penpot-penpot-backend-1 | at integrant.core$build_key.invokeStatic(core.cljc:313) penpot-penpot-backend-1 | at integrant.core$build_key.invoke(core.cljc:309) penpot-penpot-backend-1 | at clojure.core$partial$fn__5924.invoke(core.clj:2656) penpot-penpot-backend-1 | at clojure.core.protocols$fn__8263.invokeStatic(protocols.clj:168) penpot-penpot-backend-1 | at clojure.core.protocols$fn__8263.invoke(protocols.clj:124) penpot-penpot-backend-1 | at clojure.core.protocols$fn__8218$G__8213__8227.invoke(protocols.clj:19) penpot-penpot-backend-1 | at clojure.core.protocols$seq_reduce.invokeStatic(protocols.clj:31) penpot-penpot-backend-1 | at clojure.core.protocols$fn__8250.invokeStatic(protocols.clj:75) penpot-penpot-backend-1 | at clojure.core.protocols$fn__8250.invoke(protocols.clj:75) penpot-penpot-backend-1 | at clojure.core.protocols$fn__8192$G__8187__8205.invoke(protocols.clj:13) penpot-penpot-backend-1 | at clojure.core$reduce.invokeStatic(core.clj:6908) penpot-penpot-backend-1 | at clojure.core$reduce.invoke(core.clj:6890) penpot-penpot-backend-1 | at integrant.core$build.invokeStatic(core.cljc:337) penpot-penpot-backend-1 | at integrant.core$build.invoke(core.cljc:316) penpot-penpot-backend-1 | at integrant.core$init.invokeStatic(core.cljc:445) penpot-penpot-backend-1 | at integrant.core$init.invoke(core.cljc:437) penpot-penpot-backend-1 | at integrant.core$init.invokeStatic(core.cljc:442) penpot-penpot-backend-1 | at integrant.core$init.invoke(core.cljc:437) penpot-penpot-backend-1 | at app.main$start$fn__44846.invoke(main.clj:525) penpot-penpot-backend-1 | at clojure.lang.AFn.applyToHelper(AFn.java:154) penpot-penpot-backend-1 | at clojure.lang.AFn.applyTo(AFn.java:144) penpot-penpot-backend-1 | at clojure.lang.Var.alterRoot(Var.java:310) penpot-penpot-backend-1 | at clojure.core$alter_var_root.invokeStatic(core.clj:5549) penpot-penpot-backend-1 | at clojure.core$alter_var_root.doInvoke(core.clj:5544) penpot-penpot-backend-1 | at clojure.lang.RestFn.invoke(RestFn.java:428) penpot-penpot-backend-1 | at app.main$start.invokeStatic(main.clj:519) penpot-penpot-backend-1 | at app.main$start.invoke(main.clj:516) penpot-penpot-backend-1 | at app.main$_main.invokeStatic(main.clj:585) penpot-penpot-backend-1 | at app.main$_main.doInvoke(main.clj:577) penpot-penpot-backend-1 | at clojure.lang.RestFn.invoke(RestFn.java:400) penpot-penpot-backend-1 | at clojure.lang.AFn.applyToHelper(AFn.java:152) penpot-penpot-backend-1 | at clojure.lang.RestFn.applyTo(RestFn.java:135) penpot-penpot-backend-1 | at clojure.lang.Var.applyTo(Var.java:707) penpot-penpot-backend-1 | at clojure.core$apply.invokeStatic(core.clj:667) penpot-penpot-backend-1 | at clojure.main$main_opt.invokeStatic(main.clj:515) penpot-penpot-backend-1 | at clojure.main$main_opt.invoke(main.clj:511) penpot-penpot-backend-1 | at clojure.main$main.invokeStatic(main.clj:665) penpot-penpot-backend-1 | at clojure.main$main.doInvoke(main.clj:617) penpot-penpot-backend-1 | at clojure.lang.RestFn.applyTo(RestFn.java:140) penpot-penpot-backend-1 | at clojure.lang.Var.applyTo(Var.java:707) penpot-penpot-backend-1 | at clojure.main.main(main.java:40) ```

Additional context

No response

teha75 commented 7 months ago

same here

MDXDave commented 7 months ago

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.

violoncelloCH commented 7 months ago

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

teha75 commented 7 months ago

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!

madalenapmelo-kp commented 7 months ago

Hi @violoncelloCH,

Could you confirm that you were able to address this issue?

violoncelloCH commented 6 months ago

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 :)

madalenapmelo-kp commented 6 months ago

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: