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:
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
Django 2.1 have dropped support for postgres 9.3
try to update your postgres version
django 2.1 release note
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With