olirice / alembic_utils

An alembic/sqlalchemy extension for migrating sql views, functions, triggers, and policies
MIT License
193 stars 42 forks source link

INFO: Transaction approach incompatible with MySQL #113

Closed notatallshaw-gts closed 1 year ago

notatallshaw-gts commented 1 year ago

This isn't an issue with the project per se, but I wanted to give an informational notice for those who are asking for MySQL support or looking to fork themselves and I couldn't come up with a better place to put this.

MySQL does not support transactional schemas, (e.g. CREATE and DROP statements implicitly commit to the database), this is true for at least MySQL 8.0 and lower (atomic DDL does not help, it is still not transactional).

Therefore alembic_utils approach to solve certain problems, e.g. via it's simulate_entity function does not work in MySQL: https://github.com/olirice/alembic_utils/blob/master/src/alembic_utils/simulate.py#L17

So if anyone wants to fork this project to support MySQL they must come up with a different approach to solve these same problems (I am testing some different approaches to see what works but I will not be looking to publicly fork or request to upstream).

Feel free to close this.