Foreign keys don't work in MySQL
|Reported by:||Manuzhai||Owned by:||adrian|
|Component:||Database layer (models, ORM)||Version:|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Django generates: post_id mediumint(9) unsigned auto_increment NOT NULL REFERENCES posts_posts (slug)
This doesn't work. In MySQL, only one column can have auto_increment, and that same column has to be the PRIMARY KEY. I think there should be a separate DATATYPE for ForeignKeys (it seems to just reuse the AutoField).