Skip to content

Can not access table migration on superuser role #4359

@FredericoGauz

Description

@FredericoGauz

Bug report

  • [ x] I confirm this is a bug with Supabase, not with my own application.
  • [x ] I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

A clear and concise description of what the bug is.

When trying to access the migrations table I receive the following error (exact words vary depending on the command used at the time, this is from supabase link):

failed to fetch storage migration: ERROR: permission denied for table migrations (SQLSTATE 42501)

Same error will show up if I try to grant permissions either to only migrations table (or the storage schema) or all the tables via query:

GRANT SELECT, INSERT, UPDATE, DELETE ON ALL TABLES IN SCHEMA storage TO postgres;

ERROR: 42501: permission denied for table migrations

This error is not allowing me to create backups or to run supabase locally.

To Reproduce

Just run the query:

GRANT SELECT, INSERT, UPDATE, DELETE ON ALL TABLES IN SCHEMA storage TO postgres;

Expected behavior

The postgres role should have all migrations table (storage schema) permissions.

Screenshots

If applicable, add screenshots to help explain your problem.

System information

  • OS: [e.g. macOS, Windows]
  • Browser (if applies) [e.g. chrome, safari]
  • Version of supabase-js: [e.g. 6.0.2]
  • Version of Node.js: [e.g. 10.10.0]

Additional context

It's probably a problem with my user only, but I am not sure.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions