5

I am getting error while making migrate on django 2.1 application

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    dependencies = [
        ('sawy', '0005_auto_20190418_0607'),
    ]

    operations = [
        migrations.AlterField(
            model_name='response',
            name='action',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='response', to='sawy.Action'),
        ),
    ]

Error:

 Applying sawy.0006_auto_20190418_0608...Traceback 
....
....
....

django.db.utils.ProgrammingError: syntax error at or near "WITH ORDINALITY" LINE 6:
  • Python Version : 3.6
  • django Version : 2.1.4
  • DB: Postgres

Edit

Modal

class Response(models.Model):
    action = models.ForeignKey(Action, on_delete=models.CASCADE, related_name='response')
    text = models.TextField(blank=True,unique=True)
    def __str__(self):
        return self.text
2
  • Can you share your whole stack trace and also your models, please?! Commented Apr 18, 2019 at 6:37
  • have you renamed any field ? Commented Apr 18, 2019 at 7:05

1 Answer 1

10

Django 2.1 have dropped support for postgres 9.3

try to update your postgres version

django 2.1 release note

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.