graphql-engine
graphql-engine copied to clipboard
Allow running migrations with different database user with escalated priveledges
In some of our migrations, we create extensions which require the postgres user to have superuser permissions. When running the migrations it seems like hasura uses the user configured with the hasura instance. We have given this user only the permissions it needs to perform its actions as an application server (ie. no super user permissions)
The problem we have is that in order to run our migrations we need to elevate the role of our hasura db user to be a super user.
Proposed solution
I propose that the hasura cli provides arguments that allow you to specify the username and password of the db user you would like to use in order to run the migrations
Describe alternatives you've considered
- Elevate the permissions of our application db user 😢
If the feature is approved, would you be willing to submit a PR?
- I don't know haskel 🙈
Converted to discussion to facilitate.