Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

[bot] Sync from supabase/troubleshooting (#46125)

supabase-supabase-autofixer[bot]f13cc98b4f2b
diff --git a/apps/docs/content/troubleshooting/managing-or-disconnecting-github-oauth-connections-e3dc3b.mdx b/apps/docs/content/troubleshooting/managing-or-disconnecting-github-oauth-connections-e3dc3b.mdx
new file mode 100644
index 00000000000..a85edd56d9c
--- /dev/null
+++ b/apps/docs/content/troubleshooting/managing-or-disconnecting-github-oauth-connections-e3dc3b.mdx
@@ -0,0 +1,39 @@
+---
+title = "Managing GitHub Integration in Supabase Studio"
+date_created = "2026-05-14T20:04:18+00:00"
+topics = [ "platform" ]
+keywords = [ "github", "integration", "oauth", "disconnect", "permissions", "branching" ]
+---
+
+The option to disconnect a GitHub account may be missing from Project or Organization settings, or permission errors may be displayed when trying to modify organization-level integrations. This happens because the GitHub integration is managed at three distinct levels — **Account**, **Organization**, and **Project** — and the underlying OAuth grant lives at the Account level.
+
+## Where the GitHub connection is configured
+
+### 1. Account preferences
+
+In [Account Preferences](/dashboard/account/me) you authorize the GitHub OAuth app so Supabase can read your repositories. From here you can re-authenticate or remove the connection entirely.
+
+### 2. Organization integration settings
+
+In [Organization Integration Settings](/dashboard/org/_/integrations) you can see every project in the organization that is connected to a GitHub repository. From here you can:
+
+- Open **Configure connection** to jump to the Project integration settings.
+- Delete a connection to remove the link between a project and its GitHub repository. This does not revoke the underlying OAuth grant on the account level.
+
+If your role only grants access to a subset of projects in the organization, the GitHub and Vercel sections of this page can return a permission error. See [Access Control — organization integration permissions](/docs/guides/platform/access-control#org-integration-permissions) for the required permissions.
+
+### 3. Project integration settings
+
+Project-level settings let you sync preview branches with a chosen GitHub branch, keep the production branch in sync, and automatically create a preview branch for every pull request.
+
+## How to update or remove the connection
+
+1. Go to [Account Preferences](/dashboard/account/me).
+2. Find the **GitHub** integration section.
+3. Click **Manage**, then **Remove connection**.
+4. To link a different GitHub account or change the granted scope, re-initiate the GitHub connection flow from the project or organization where you want the new link to apply.
+
+## Related guides
+
+- [Access Control — organization integration permissions](/docs/guides/platform/access-control#org-integration-permissions)
+- [Branching](/docs/guides/deployment/branching)
diff --git a/apps/docs/content/troubleshooting/postgrest-error-pgrst002-could-not-query-the-database-for-the-schema-cache-c396e9.mdx b/apps/docs/content/troubleshooting/postgrest-error-pgrst002-could-not-query-the-database-for-the-schema-cache-c396e9.mdx
new file mode 100644
index 00000000000..d5ee3eda2f3
--- /dev/null
+++ b/apps/docs/content/troubleshooting/postgrest-error-pgrst002-could-not-query-the-database-for-the-schema-cache-c396e9.mdx
@@ -0,0 +1,30 @@
+---
+title = "PostgREST error: {PGRST002: Could not query the database for the schema cache}"
+date_created = "2026-05-19T10:04:53+00:00"
+topics = [ "database" ]
+keywords = [ "postgrest" ]
+[[errors]]
+code = "PGRST002"
+message = "Could not query the database for the schema cache"
+
+---
+
+A schema should first be removed from the **Exposed schemas** in Data API settings before dropping it from the database.
+
+If you encounter a `PGRST002` error when making API requests, it can be that a schema still listed in the Data API configuration has been dropped from the database. PostgREST cannot build the schema cache if any schema defined in its `db_schemas` setting is missing.
+
+**How to resolve this issue:**
+
+1. Temporarily recreate the deleted schema to restore API connectivity.
+2. Navigate to [Project Settings > Data API](/dashboard/project/_/settings/api).
+3. Remove the target schema from the **Exposed Schemas** list and click **Save**.
+4. Once the settings are saved, you can safely drop the schema from the database.
+
+**Manual Overrides**
+
+If you have manually executed `ALTER ROLE authenticator SET pgrst.db_schemas`, the Dashboard UI will no longer manage your schemas. You must manually update the role configuration:
+
+```sql
+ALTER ROLE authenticator SET pgrst.db_schemas = 'public, example_schema';
+NOTIFY pgrst, 'reload config';
+```