Discourse Local setup

AI-generated summary

In a discussion about setting up Discourse locally, Anusri encountered an error while running their URL: PG::SyntaxError: ERROR: syntax error at or near "NOT". simon suggested that Anusri confirm if they followed the Beginners Guide to Install Discourse on Ubuntu for Development.

Anusri confirmed they followed the guide, but the issue persisted. Falco asked about the Ubuntu version being used, suggesting that older versions may require a PostgreSQL PPA for the setup to work. stujo suspected a PostgreSQL version issue, recommending a version >= 9.6. Falco recommended PostgreSQL 13. Upgrading to Postgres 10 allowed stujo to proceed with the installation.

hi,
I have installed discourse in my local using ubuntu software.
i cannot run my url its showing below error, plz can any one help me?

Error:
An error has occurred, all later migrations canceled: PG::SyntaxError: ERROR: syntax error at or near “NOT” LINE 2: ADD COLUMN IF NOT EXISTS image_upload_id bigint ^

I’m probably not the right person to help with this issue, but can you confirm that you installed Discourse on your local server by following this guide: Beginners Guide to Install Discourse on Ubuntu for Development?

I’m assuming that you are creating a local development site and not a production site.

Yes, i am following that guide only and creating my local development.
i am not able to fix that issue.

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

What distro are you running? That setup will work on latest Ubuntu and latest LTS Ubuntu.

If you are running an older version you will need to add a PostgreSQL PPA in order to get a more recent version.

Could this be a postgres version issue? Looks like we need postgres >= 9.6 ?

What version is recommended?

PostgreSQL 13 is the recommended.

Upgrading to postgres:10 allows the installation to proceed