2

I am performing migrations using alembic.

Configuration is of course stored in the alembic.ini file.

I would like to have the encoding used when running the migrations as a configurable parameter.

Is there a field that can be used within alembic.ini to do so?

e.g.

[various_config]
migrations_encoding=latin1

so that the sqlalchemy url ends up being, e.g.

sqlalchemy.url = mysql+pymysql://user:password@db/db?charset=<the_value_above>
pkaramol
  • 16,451
  • 43
  • 149
  • 324
  • 1
    Did you fix this? Can you post and answer? – edlee Mar 22 '19 at 08:09
  • Some interesting investigation here: https://stackoverflow.com/questions/50012917/flask-sqlalchemy-alembic-migration-sends-invalid-charset-to-pymysql but no answer – Charles L. Jan 19 '23 at 22:27

0 Answers0