Skip to content

Commit 68fe370

Browse files
authored
backup-restore.mdx: Better fix (supabase#36857)
The argument, I previously fixed, was actually correct for version @2 but the header said to use @1, so better change that and use the newer argument style.
1 parent 821663a commit 68fe370

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

apps/docs/content/guides/platform/migrating-within-supabase/backup-restore.mdx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ supabase db diff --linked --schema auth,storage > changes.sql
227227
The new project has the old project's Storage buckets, but the Storage objects need to be migrated manually. Use this script to move storage objects from one project to another.
228228

229229
```js
230-
// npm install @supabase/supabase-js@1
230+
// npm install @supabase/supabase-js@2
231231
const { createClient } = require('@supabase/supabase-js')
232232

233233
const OLD_PROJECT_URL = 'https://xxx.supabase.co'
@@ -238,7 +238,9 @@ const NEW_PROJECT_SERVICE_KEY = 'new-project-service-key-yyy'
238238

239239
;(async () => {
240240
const oldSupabaseRestClient = createClient(OLD_PROJECT_URL, OLD_PROJECT_SERVICE_KEY, {
241-
schema: 'storage',
241+
db: {
242+
schema: 'storage',
243+
},
242244
})
243245
const oldSupabaseClient = createClient(OLD_PROJECT_URL, OLD_PROJECT_SERVICE_KEY)
244246
const newSupabaseClient = createClient(NEW_PROJECT_URL, NEW_PROJECT_SERVICE_KEY)

0 commit comments

Comments
 (0)