Why are migrations not always run as the root user/why does graphile-migrate require multiple users? · Issue #215 · graphile/migrate · GitHub
More Web Proxy on the site http://driver.im/
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My initial experimentation with grahile-migrate has had me run into a few issues with permissions (for example, see the discussion in #214 ). More specifically:
I'm having trouble running CREATE EXTENSION statements because they sometimes require superuser access.
graphile-migrate uses the DATABASE_URL credentials to apply migrations. However, the documentation explicitly uses another user than ROOT_DATABASE_URL for this connection called appuser. However, I do not want my application user to run CREATE TABLE/DROP TABLE etc..
So far, this has led to me creating a "special" graphile_migrate user with permissions to apply changes. However, given the constant permission issues, this user is essentially becoming another superuser to secure. Therefore, I'm thinking of just switching DATABASE_URL to use the same admin user as ROOT_DATABASE_URL instead.
My question is why DATABASE_URL is documented to use an appuser rather than root/postgres? Are there specific reasons graphile-migrate requires multiple users or security concerns with using the root/postgres user?