pretix / pretix

Ticket shop application for conferences, festivals, concerts, tech events, shows, exhibitions, workshops, barcamps, etc.
https://pretix.eu
Other
1.73k stars 431 forks source link

failed to find column "public"."pretixbase_eventmetaproperty"."allowed_values" in target table #4112

Closed maxihaindl closed 1 month ago

maxihaindl commented 1 month ago

Problem and impact

Hey all,

Im trying to migrate from mysql to postgres based on the manual but running into an error from pgloader docker dimitri/pgloader:latest Im running pgloader version "3.6.7~devel"

The error message is

KABOOM!
SIMPLE-ERROR: pgloader failed to find column "public"."pretixbase_eventmetaproperty"."allowed_values" in target table "\"public\".\"pretixbase_eventmetaproperty\""
An unhandled error condition has been signalled:
   pgloader failed to find column "public"."pretixbase_eventmetaproperty"."allowed_values" in target table "\"public\".\"pretixbase_eventmetaproperty\""

but the target column is there for sure, so I though this might be another pgloader issue :-) Hope someone can help me out Cheers

Expected behaviour

The output should end with a table summarizing the results for every table.

Steps to reproduce

No response

Screenshots

Bildschirmfoto 2024-04-24 um 17 52 44 Bildschirmfoto 2024-04-24 um 17 53 05 Bildschirmfoto 2024-04-24 um 17 53 50

Link

No response

Browser (software, desktop or mobile?) and version

No response

Operating system, dependency versions

docker:2024.3 on centOS

Version

2024.3

maxihaindl commented 1 month ago

It seems I missunderstood the error message as it says: TARGET table

So having a look on the postgres schema indeed reveals theres no such column and this is because I ran the migration with another tag then stable This was my command: docker run --rm -v ./pretix-data:/data -v ./etc/pretix:/etc/pretix -e REDIS_URL=redis://:xyz@ip-address:6379/1 pretix/standalone:2024.3 migrate

But, recreating the postgresql schema with stable tag still does not create column pretix.pretixbaase_eventmetaproperty.allowed_values

raphaelm commented 1 month ago

Your problem seems to be that the two databases are created with different pretix versions. You need to create the PostgreSQL database with the pretix version you are currently using on MySQL, then execute pgloader, then upgrade. You can't upgrade and migrate in the same step.