Skip to content

Instantly share code, notes, and snippets.

View meksor's full-sized avatar

Max Wolschlager meksor

View GitHub Profile
@jasco
jasco / README.md
Last active August 5, 2025 13:42
Workaround for SqlAlchemy Alembic Migrations

Dialect specific migration with Alembic

DDL

Certain SQL dialect specific SQL including triggers and stored procedures are not abstracted away by SqlAlchemy. In those cases SqlAlchemy provides a DDL interface that can be connected to events that conditionally trigger the appropriate dialect specific code.

ddl = sqlalchemy.DDL(custom_pg_trigger)