We’ve been using Django for years for our project. But moved away from using its migrations due to issues, a long time ago. We’ve recently begun moving back, but when I run "migrate ", I get a generic mysql error and no pointer to which table/model that caused it:
(1118, ‘Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs’)
I’ve read on stackoverflow, and other places, that I can change a setting in regards to our DB server.
But this doesn’t make sense to me, as we have a custom build_tables.sql file that generates all our tables and that works without this error.
There are 100s of models so reading “You have to change some columns to TEXT or BLOBs” wasn’t helpful from the MySQL error exception.
I’ve found the last table it made - by checking the DB Vs the 0001_initial.py.
Worryingly, all tables made before have none of the “unique” keys. Is this normal? Id have thought that Django would make the tables with their keys in one go?
I can’t see anything explicitly wrong with the model/table it didnt make (and I assume broke at).
Does anyone have any ideas/pointers I could look at ?
How does django migrate work? It seems to do everything in passes?
Like it failed but created 90% of my tables. So I removed the “broken” table and ran again, this time it failed somewhere else, but still not creating all tables and now some do, and some don’t, have Keys