trino-python-client icon indicating copy to clipboard operation
trino-python-client copied to clipboard

Alembic support for Trino

Open sergio-ropero opened this issue 3 years ago • 2 comments

Describe the feature

It would be awesome to use Alembic for Trino in order to apply migrations and being able to rollback. That can help with the CI/CD pipelines without overthinking an in-house solution when the technology is already in place.

Also, the Trino dialect is already implemented so it's a matter to connect the dots between the dialect and the Alembic usage (like the Imp for postgresql as example).

Describe alternatives you've considered

I have been able to use it with a workaround creating an empty implementation with the trino dialect but a proper implementation would be better and more functional:

from alembic.ddl.impl import DefaultImpl


class TrinoImpl(DefaultImpl):
    __dialect__ = 'trino'

Are you willing to submit PR?

  • [ ] Yes I am willing to submit a PR!

sergio-ropero avatar Nov 15 '22 14:11 sergio-ropero

We can use https://github.com/SAP/sqlalchemy-hana/blob/main/sqlalchemy_hana/alembic.py as inspiration for when we work on this.

hashhar avatar Sep 03 '24 07:09 hashhar

@sergio-ropero Are you able achieve most functionality using the empty Trino Impl ?

andrewa-habitat avatar Sep 05 '25 17:09 andrewa-habitat