Describe the bug
A clear and concise description of what the bug is.
The database in the local environment just uses the superuser (postgres) for everything. This is different from Staging and Production which use a dedicated app user. This bit us recently with table ownership preventing a migration that used ALTER TABLE from running on staging. We updated the table and type ownership on both staging and production to be owned by the APP user. We need to make the local database match.
To Reproduce
Steps to reproduce the behavior:
Log in to the local database container using psql
Run \d to list the tables and their owners
Actual behavior
What actually happened?
Tables are owned by postgres.
Expected behavior
A clear and concise description of what you expected to happen.
Describe the bug A clear and concise description of what the bug is.
The database in the local environment just uses the superuser (postgres) for everything. This is different from Staging and Production which use a dedicated app user. This bit us recently with table ownership preventing a migration that used
ALTER TABLE
from running on staging. We updated the table and type ownership on both staging and production to be owned by the APP user. We need to make the local database match.To Reproduce Steps to reproduce the behavior:
psql
\d
to list the tables and their ownersActual behavior What actually happened?
Tables are owned by
postgres
.Expected behavior A clear and concise description of what you expected to happen.
Tables should be owned by
app
.