Как решить проблему - колонка libman_llrguides.id не существует
У меня есть модель в моем приложении django, как показано ниже...
class LLRGuides(models.Model):
title = models.CharField(max_length=40)
heading = models.CharField(max_length=60)
body = models.TextField(default='Type the description of the guide here')
Я вручную создал таблицу в своей базе данных через pg_admin, вручную добавил столбцы. Проблема возникает, когда я пытаюсь создать экземпляр модели, он жалуется на отсутствие столбца id.
null value in column "id" of relation "libman_llrguides" violates not-null constraint
DETAIL: Failing row contains (d, d, Type the description of the guide here, null).
Это sql, который создал поле id в pg_Admin
ALTER TABLE IF EXISTS public.libman_llrguides
ADD COLUMN id integer NOT NULL;