From 68fe370acea8b5f871df2044821578d167ae18a7 Mon Sep 17 00:00:00 2001 From: Tilman Vogel Date: Mon, 28 Jul 2025 17:31:37 +0200 Subject: [PATCH] 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. --- .../platform/migrating-within-supabase/backup-restore.mdx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/docs/content/guides/platform/migrating-within-supabase/backup-restore.mdx b/apps/docs/content/guides/platform/migrating-within-supabase/backup-restore.mdx index fd3644ed209..f26c2f72814 100644 --- a/apps/docs/content/guides/platform/migrating-within-supabase/backup-restore.mdx +++ b/apps/docs/content/guides/platform/migrating-within-supabase/backup-restore.mdx @@ -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)