peerreview icon indicating copy to clipboard operation
peerreview copied to clipboard

Local database uses different permissions from staging and production

Open danielBingham opened this issue 1 year ago • 0 comments

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:

  1. Log in to the local database container using psql
  2. 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.

Tables should be owned by app.

danielBingham avatar Jun 28 '23 14:06 danielBingham