SimpleJWT: Re-apply Blacklist Token Migration: "Table 'token_blacklist_blacklistedtoken' doesn't exist"
I have, rather sillily, run "python manage.py migrate" when I added Django SimpleJWT's token blacklist functionality to my program. This means whenever I try to generate tokens or use any functionality, I run into the error...
(1146, "Table 'token_blacklist_outstandingtoken' doesn't exist")
I have tried unapplying and redoing the migrations for "token_blacklist", but I get the same error...
python manage.py migrate token_blacklist zero
Operations to perform:
Unapply all migrations: token_blacklist
Running migrations:
Rendering model states... DONE
Unapplying token_blacklist.0012_alter_outstandingtoken_user... OK
Unapplying token_blacklist.0011_linearizes_history... OK
Unapplying token_blacklist.0010_fix_migrate_to_bigautofield... OK
Unapplying token_blacklist.0008_migrate_to_bigautofield...Traceback (most recent call last):
return self.cursor.execute(sql)
^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\fiona\AppData\Roaming\Python\Python312\site-packages\django\db\backends\mysql\base.py", line 76, in execute
return self.cursor.execute(query, args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python312\Lib\site-packages\MySQLdb\cursors.py", line 179, in execute
res = self._query(mogrified_query)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python312\Lib\site-packages\MySQLdb\cursors.py", line 330, in _query
db.query(q)
File "C:\Python312\Lib\site-packages\MySQLdb\connections.py", line 265, in query
_mysql.connection.query(self, query)
MySQLdb.ProgrammingError: (1146, "Table 'token_blacklist_blacklistedtoken' doesn't exist")
...
I have tried uninstalling and re-installing the package, djangorestframework-simplejwt, but that also hasn't worked.
How do I resolve this? Thank you for any help