Error with update stable 2.4.1 to stable 2.5.1

Hello! I have stable Discourse 2.4.1 with external PostgreSQL 9.5.23.
I trying upgrade to stable 2.5.1 and received error wit bundle rake dm:migration step:

PG::SyntaxError: ERROR:  syntax error at or near "NOT"
LINE 2: ADD COLUMN IF NOT EXISTS image_upload_id bigint

Is it because PostgreSQL is very old? Which PostgreSQL version is recommended?

Yes.

You should use PostgreSQL 12.

1 Like