BlogLabs

How to solve: mysql_exceptions.OperationalError: (1005, Can’t create table (errno: 150))

Feb 02, 2011
This occurs when you have a mixture of MyISAM and INNODB database tables in your database, and you try and run:
python manage.py syncdb
It's due to it trying to create constraints across the two table types. So best to have a single database table type of either INNODB or MyISAM! Change your table types so they match and you should be sorted.
Evan
Share on LinkedInTweet about this on Twitter

________________________________________________/\\\_______________________/\\\\\\_____/\\\\\\_________________ _______________________________________________\/\\\______________________\////\\\____\////\\\_________________ _____/\\\______________________________________\/\\\_________________________\/\\\_______\/\\\_________________ __/\\\\\\\\\\\__/\\____/\\___/\\_____/\\\\\____\/\\\_________/\\\____/\\\____\/\\\_______\/\\\_____/\\\\\\\\\\_ _\////\\\////__\/\\\__/\\\\_/\\\___/\\\///\\\__\/\\\\\\\\\__\/\\\___\/\\\____\/\\\_______\/\\\____\/\\\//////__ ____\/\\\______\//\\\/\\\\\/\\\___/\\\__\//\\\_\/\\\////\\\_\/\\\___\/\\\____\/\\\_______\/\\\____\/\\\\\\\\\\_ ____\/\\\_/\\___\//\\\\\/\\\\\___\//\\\__/\\\__\/\\\__\/\\\_\/\\\___\/\\\____\/\\\_______\/\\\____\////////\\\_ ____\//\\\\\_____\//\\\\//\\\_____\///\\\\\/___\/\\\\\\\\\__\//\\\\\\\\\___/\\\\\\\\\__/\\\\\\\\\__/\\\\\\\\\\_ _____\/////_______\///__\///________\/////_____\/////////____\/////////___\/////////__\/////////__\//////////__

Please rotate your device