Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
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: