diff --git a/apps/docs/pages/guides/cli/local-development.mdx b/apps/docs/pages/guides/cli/local-development.mdx index 57b4e5abf52..8c719d931be 100644 --- a/apps/docs/pages/guides/cli/local-development.mdx +++ b/apps/docs/pages/guides/cli/local-development.mdx @@ -364,12 +364,12 @@ Associate your project with your remote project using [`supabase link`](/docs/re supabase link --project-ref # You can get from your project's dashboard URL: https://supabase.com/dashboard/project/ -supabase db remote commit +supabase db pull # Capture any changes that you have made to your remote database before you went through the steps above # If you have not made any changes to the remote database, skip this step ``` -`supabase/migrations` is now populated with a migration in `..._remote_commit.sql`. +`supabase/migrations` is now populated with a migration in `_remote_schema.sql`. This migration captures any changes required for your local database to match the schema of your remote Supabase project. @@ -420,7 +420,7 @@ For these changes to take effect, you need to run `supabase stop` and `supabase If you have additional triggers or RLS policies defined on your `auth` schema, you can pull them as a migration file locally. ```bash -supabase db remote commit --schema auth +supabase db pull --schema auth ``` ### Local Logging diff --git a/apps/docs/pages/guides/cli/managing-environments.mdx b/apps/docs/pages/guides/cli/managing-environments.mdx index b20a4c5c5f1..59bd4ed51fe 100644 --- a/apps/docs/pages/guides/cli/managing-environments.mdx +++ b/apps/docs/pages/guides/cli/managing-environments.mdx @@ -38,10 +38,10 @@ If you're using an existing Supabase project, you might have made schema changes Run the following command to pull these changes before making local schema changes from the CLI: ```sql -supabase db remote commit +supabase db pull ``` -This command creates a new migration in `supabase/migrations/_remote_commit.sql` which reflects the schema changes you have made previously. +This command creates a new migration in `supabase/migrations/_remote_schema.sql` which reflects the schema changes you have made previously. Now commit your local changes to Git and run the local development setup: @@ -348,9 +348,9 @@ Once pushed, check that the migration version is up to date for both local and r supabase migration list ``` -### Permission denied on db remote commit +### Permission denied on db pull -If you have been using Supabase hosted projects for a long time, you might encounter the following permission error when executing `db remote commit`. +If you have been using Supabase hosted projects for a long time, you might encounter the following permission error when executing `db pull`. ```bash Error: Error running pg_dump on remote database: pg_dump: error: query failed: ERROR: permission denied for table _type diff --git a/spec/cli_v1_commands.yaml b/spec/cli_v1_commands.yaml index ee44e2afdee..3f94d073f92 100644 --- a/spec/cli_v1_commands.yaml +++ b/spec/cli_v1_commands.yaml @@ -1191,7 +1191,7 @@ commands: To reset your migration history to a clean state, first delete your local migration file. ```bash - $ rm supabase/migrations/20230103054303_remote_commit.sql + $ rm supabase/migrations/20230103054303_remote_schema.sql $ supabase migration list LOCAL │ REMOTE │ TIME (UTC) ─────────────────┼────────────────┼────────────────────── @@ -2568,7 +2568,7 @@ commands: response: | Connecting to local database... Creating shadow database... - Applying migration 20230425064254_remote_commit.sql... + Applying migration 20230425064254_remote_schema.sql... Diffing schemas: auth,extensions,public,storage Finished supabase db diff on branch main.