N
N
njkit2020-12-17 03:04:49
Django
njkit, 2020-12-17 03:04:49

Migrations Error django.db.utils.IntegrityError: NOT NULL constraint failed:?

The bottom line is that I needed to add a field, I did everything, migrated, everything is ok. But then I had to remove it. Migrated, created migration (remove). On subsequent migrations, I get an error related to the field I removed django.db.utils.IntegrityError: NOT NULL constraint failed: Since I'm new to django, I would like some clarification about the migration files, how can I fix the error?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
njkit, 2020-12-17
@njkit

Answer: there was a problem in the field that I created, I went into the migration file where this field was created, added null=True, then migrated. The error is gone

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question