chore: update references for remote commit to db pull

This commit is contained in:
Qiao Han committed 2023-08-16 11:08:02 +08:00
1 parent 85185f0f73
commit dd61b6eebc
3 files changed
+9 -9

No files matched your search

@@ -364,12 +364,12 @@ Associate your project with your remote project using [`supabase link`](/docs/re
supabase link --project-ref <project-id>
# You can get <project-id> from your project's dashboard URL: https://supabase.com/dashboard/project/<project-id>
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 `<timestamp>_remote_schema.sql`.
This migration captures any changes required for your local database to match the schema of your remote Supabase project.
<Admonition type="note">
@@ -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
@@ -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/<timestamp>_remote_commit.sql` which reflects the schema changes you have made previously.
This command creates a new migration in `supabase/migrations/<timestamp>_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
+2 -2
View File
@@ -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.