compare_server_default throws TypeError under a very specific condition in MySQL #553
If the column doesn't have a default value and a server_default is added to the models.py file then autogenerate will throw a "TypeError: expected string or bytes-like object". I tried reversing it so the database has a default and the models.py file doesn't and I got no errors which suggests that the way alembic is pulling in the default value isn't being handled well in this this situation.
This caused the error:
This did not cause an error:
The text was updated successfully, but these errors were encountered: