[Fixed]-Many-to-many relationship in Django "ProgrammingError: column shoe_size_run.id does not exist"

1👍

Your table shoe_size_run has a composite primary key (sku,
size_run_id)
. Unfortunately, Django does not support this yet (see ticket 373)

If you want to use the table in Django, you’ll have to add a single column primary key to that table. The easiest column name is id, since that’s what Django expects by default.

Looking at your diagram, you’ll need to do the same thing for your shoe_image table as well.

0👍

The table is shoe_size_run and the column is size_run_id. So your model field needs to be size_run_id rather than size_run.

Leave a comment