Defect #37986
postgresql 15: additional steps required while initializing database
Status: | New | Start date: | ||
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | - | % Done: | 0% | |
Category: | Documentation | |||
Target version: | - | |||
Resolution: | Affected version: | 5.0.3 |
Description
I tried to install on alpine/edge with clean postgresql 15 setup. Errors were produced while initializing database:
prod1:~/redmine$ RAILS_ENV=production bundle exec rake db:migrate rake aborted! ActiveRecord::StatementInvalid: PG::InsufficientPrivilege: ERROR: permission denied for schema public LINE 1: CREATE TABLE "schema_migrations" ("version" character varyin...
While following installation step 2 (https://www.redmine.org/projects/redmine/wiki/RedmineInstall#PostgreSQL), I had to use additional commands in postgresql:
\c redmine postgres grant all on schema public to redmine
source: https://www.cybertec-postgresql.com/en/error-permission-denied-schema-public/
Only then
RAILS_ENV=production bundle exec rake db:migrate
worked as expected.