Skip to content

Running up/down-grades as a role #1067

Discussion options

You must be logged in to vote

hey there -

alembic and SQLAlchemy have no interaction with roles. the URL that you provide is how the driver connects, and from there, it just executes commands. so this would be a question of configuring your database to allow a login that comes in as what you need. on this end I dont even know what database this is, so if you happen to share that information, I can point you to the driver documentation where they might have advice on this.

if the solution ends up that you need to execute a command after connecting, you can configure that in your env.py by running that command on the connection after you've created it, something like:

    with connectable.connect() as connection:
        

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@keriksson-rosenqvist
Comment options

@zzzeek
Comment options

@keriksson-rosenqvist
Comment options

Answer selected by keriksson-rosenqvist
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants