I have 2 models:
class MdlCourse(models.Model):
id = models.BigAutoField(primary_key=True)
category = models.ForeignKey(MdlCourseCategories, on_delete=models.CASCADE)
sortorder = models.BigIntegerField()
fullname = models.CharField(max_length=254)
class MdlCourseCategories(models.Model):
id = models.BigAutoField(primary_key=True)
name = models.CharField(max_length=255)
When I run, it gives the following error:
(1054, "Unknown column 'mdl_course.category_id' in 'field list'")
What am I doing wrong?