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 (#47619)

supabase-supabase-autofixer[bot]40c9507b4a31
diff --git a/apps/docs/content/troubleshooting/auth-error-500-database-error-querying-schema-eb6b44.mdx b/apps/docs/content/troubleshooting/auth-error-500-database-error-querying-schema-eb6b44.mdx
new file mode 100644
index 00000000000..8c73b31039b
--- /dev/null
+++ b/apps/docs/content/troubleshooting/auth-error-500-database-error-querying-schema-eb6b44.mdx
@@ -0,0 +1,26 @@
+---
+title = "Auth error: '500: Database error querying schema'"
+date_created = "2026-07-02T20:04:03+00:00"
+topics = [ "auth", "database" ]
+keywords = []
+[[errors]]
+http_status_code = 500
+message = "Database error querying schema"
+
+---
+
+If you observe the error message `500: Database error querying schema` in your Auth logs, it typically indicates that the Supabase Auth server has encountered `NULL` values in the `auth.users` table where a valid string or empty string is expected.
+
+**Why Does This Happen?**
+This issue usually occurs following manual SQL inserts or updates to the `auth.users` table. The Auth service expects specific columns to contain data or an empty string; when it encounters a `NULL` value instead, it triggers a validation error.
+
+**How to Resolve This:**
+Identify the column containing the `NULL` values (such as `email`) and execute the following command in the [SQL Editor](/dashboard/project/_/sql/new) to convert them to empty strings:
+
+```sql
+UPDATE auth.users
+SET <column_name> = ''
+WHERE <column_name> IS NULL;
+```
+
+Replace `<column_name>` with the specific column causing the error. To prevent this from recurring, ensure that any future manual modifications to the `auth` schema adhere to the service's requirements.
diff --git a/apps/docs/content/troubleshooting/error-relation-supabase_migrationsschema_migrations-does-not-exist-a787d6.mdx b/apps/docs/content/troubleshooting/error-relation-supabase_migrationsschema_migrations-does-not-exist-a787d6.mdx
new file mode 100644
index 00000000000..813f64b54ea
--- /dev/null
+++ b/apps/docs/content/troubleshooting/error-relation-supabase_migrationsschema_migrations-does-not-exist-a787d6.mdx
@@ -0,0 +1,16 @@
+---
+title = "Error: relation 'supabase_migrations.schema_migrations' does not exist"
+date_created = "2026-07-02T20:06:29+00:00"
+topics = [ "cli", "database" ]
+keywords = []
+---
+
+If you are observing the error `relation "supabase_migrations.schema_migrations" does not exist` in your Postgres logs, it is typically caused by the Supabase dashboard polling for migration history.
+
+**Why Does This Happen?**
+The Supabase dashboard performs background queries to retrieve migration data from a table that is managed specifically by the Supabase CLI. If you are using a custom migration tool, a manual setup, or have not yet deployed migrations via the CLI, this table will not exist, causing the logs to report this error.
+
+**How to Resolve:**
+
+- **Ignore the error:** If you are not using the Supabase CLI to manage your database migrations, this error is a harmless side effect of dashboard polling and can be safely ignored.
+- **Initialize the migration metadata**: If you manage your database with the Supabase CLI, running `supabase db push` will create the supabase_migrations schema and schema_migrations table as part of applying your local migrations. Be aware that this command may also apply any pending migration files to your database, so only run it if that's your intended workflow.