Omar Redwan
Omar Redwan

Reputation: 145

syntax error at or near "WITH ORDINALITY" error when trying to migrate postgreSQL

I was using MySQL on my computer and when I wanted to host my app on a server I could not do it because the mysqlclient package needs root priviliges!! so I had to use something else so I used the postgreSQL database and It connected and ran the makemigrations but when I tried to run the migrate it gave me the 'syntax error on or at "WITH ORDINALITY"'. Does someone know what is causing the problem?? every time I try to run migrate it give me this error!!

Upvotes: 1

Views: 356

Answers (1)

iklinac
iklinac

Reputation: 15738

Your postgreSQL version is < 9.4 which is old and out of support, you should upgrade it

From Django 3.1 docs

Django supports PostgreSQL 9.5 and higher. psycopg2 2.5.4 or higher is required, though the latest release is recommended.

Upvotes: 1

Related Questions