Summary
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?