[Django]-OperationalError: (1054, "Unknown column 'time_table.id' in 'field list'")

5👍

From the doc:

Each model requires exactly one field to have primary_key=True (either
explicitly declared or automatically added).

https://docs.djangoproject.com/en/1.9/topics/db/models/#automatic-primary-key-fields

So I’m afraid the answer is no. You can try and set the primary_key=True on one of the other fields if that works for you..

Leave a comment