Skip to content

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

📝 add guidance for syncing database schema with --schema option (#30816)

Thibault CHAUSSON1c3c3e92294e
diff --git a/apps/docs/content/guides/local-development/overview.mdx b/apps/docs/content/guides/local-development/overview.mdx
index 5b1d5912158..6e1c8a5cc60 100644
--- a/apps/docs/content/guides/local-development/overview.mdx
+++ b/apps/docs/content/guides/local-development/overview.mdx
@@ -335,6 +335,29 @@ This will upload files from `supabase/images` directory to a bucket named `image
supabase seed buckets
```
+### Sync any schema with `--schema`
+
+You can synchronize your database with a specific schema using the `--schema` option as follows:
+
+```bash
+supabase db pull --schema <schema_name>
+```
+
+<Admonition type="warning">
+
+Using `--schema`
+
+If the local `supabase/migrations` directory is empty, the db pull command will ignore the `--schema` parameter.
+
+To fix this, you can pull twice:
+
+```bash
+supabase db pull
+supabase db pull --schema <schema_name>
+```
+
+</Admonition>
+
## Limitations and considerations
The local development environment is not as feature-complete as the Supabase Platform. Here are some of the differences: