backup-restore.mdx: Better fix (#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.
This commit is contained in:
Tilman Vogel authored and GitHub committed 2025-07-28 15:31:37 +00:00
1 parent 821663abfc
commit 68fe370ace
1 file changed
+4 -2
@@ -227,7 +227,7 @@ supabase db diff --linked --schema auth,storage > changes.sql
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.
```js
// npm install @supabase/supabase-js@1
// npm install @supabase/supabase-js@2
const { createClient } = require('@supabase/supabase-js')
const OLD_PROJECT_URL = 'https://xxx.supabase.co'
@@ -238,7 +238,9 @@ const NEW_PROJECT_SERVICE_KEY = 'new-project-service-key-yyy'
;(async () => {
const oldSupabaseRestClient = createClient(OLD_PROJECT_URL, OLD_PROJECT_SERVICE_KEY, {
schema: 'storage',
db: {
schema: 'storage',
},
})
const oldSupabaseClient = createClient(OLD_PROJECT_URL, OLD_PROJECT_SERVICE_KEY)
const newSupabaseClient = createClient(NEW_PROJECT_URL, NEW_PROJECT_SERVICE_KEY)