Rails: PG::InsufficientPrivilege: ERROR: permission denied for relation schema_migrations

前端 未结 6 754
慢半拍i
慢半拍i 2021-02-07 01:48

I\'m trying to create the database in Rails. In Postgres I see the development and test database, however, I\'m getting a permissions error. I\'ve tried to follow this link, did

6条回答
  •  刺人心
    刺人心 (楼主)
    2021-02-07 02:17

    Just in case someone else comes here with the same issue, I did try many other solutions and the one that worked for me the best was the following: Modify OWNER on all tables simultaneously in PostgreSQL

    • This worked since my user (e.g. root or postgres) had Superuser privileges so trying REASSIGN OWNED gives error when trying to assign system objects
    • ALTER DATABASE didn't work since the issue is on a table object ownership and not in the DB ownership. Altering the owner on the DB doesn't propagate to the other object on that DB schema

提交回复
热议问题