django.db.utils.IntegrityError: NOT NULL constraint failed after reseting migrations

I need to save an object that contains a file and some other data. Although the file is stored on the /media folder, the entity is not saved in the database since saving it triggers an integration error.

django.db.utils.IntegrityError: NOT NULL constraint failed: app_eeg.filename

‘filename’ was a field I deleted and I already deleted the migrations folder and did the following commands:

python3 makemigrations app
python3 migrate app

class EEG(models.Model):

    file = models.FileField(null=False)                                     
    status = models.BooleanField(default=True)                     
    timestamp = models.DateTimeField(auto_now_add=True)
    report = models.ForeignKey(Report, verbose_name=('report'), on_delete=models.CASCADE, related_name='%(class)s_report', null=True)
    operator = models.ForeignKey(Operator, verbose_name=('operator'), on_delete=models.CASCADE, related_name='%(class)s_operator', null=False)
    patient = models.ForeignKey(Patient, verbose_name=('patient'), on_delete=models.CASCADE, related_name='%(class)s_patient', null=False)

How can I fix this error from happening?

That was a mistake. You do not want to ever just indiscriminately delete your migrations.

Your easiest choice at this point is to drop your database and recreate it. (Backup and restore your data as desired.)