So i have an app called accounts in which I have two models called Client and Contact. I was trying to apply migrations for the Contact field but something wasn’t working. It was saying that my email field cannot be a non-nullable field or something even though an email shouldn’t have a default. So I thought deleting the tables in PostGres would solve the problem since this is an early project, (not much data work has been done.) But now whenever I apply make the migration file, it says
Migrations for 'accounts': accounts\migrations\0001_initial.py - Create model Client - Create model Contact then when I migrate it says
Operations to perform: Apply all migrations: accounts Running migrations: No migrations to apply. . Ive tried flushing the database, deleting the migration initial file, but nothing is working still getting the same error and the migration is not applying the tables in my database. This is my Contact model.
first_name = models.CharField(max_length=50)
last_name = models.CharField(max_length=50)
email = models.EmailField(max_length=150)
date = models.DateField(default=timezone.now)
discipline = models.CharField(max_length=2, choices=Disciplines.choices, default=Disciplines.BOXING)