1๐
I further did some debugging and saw that the it does not fail on ALTER TABLE statement, instead it fails on:
DELETE FROM `django_migrations` WHERE (`django_migrations`.`app` = 'cards' AND `django_migrations`.`name` = '0023_user_pin_code');
This is a problem in django as DELETE statement is run without WHERE clause on a key column. The name is not indexed, which is why the issue crops up.
Let me raise a ticket in Django for the same.
๐คDivick
Source:stackexchange.com