danielBingham / peerreview

A diamond open access (free to access, free to publish), open source scientific and academic publishing platform.
GNU Affero General Public License v3.0
53 stars 1 forks source link

Local database uses different permissions from staging and production #182

Open danielBingham opened 1 year ago

danielBingham commented 1 year ago

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.