Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Fix wrapper create for those without foreign schema support (#37581)

Joshen Lim333e11f5f02a
diff --git a/apps/studio/components/interfaces/Integrations/Wrappers/CreateWrapperSheet.tsx b/apps/studio/components/interfaces/Integrations/Wrappers/CreateWrapperSheet.tsx
index d3884048740..54cd8ce1247 100644
--- a/apps/studio/components/interfaces/Integrations/Wrappers/CreateWrapperSheet.tsx
+++ b/apps/studio/components/interfaces/Integrations/Wrappers/CreateWrapperSheet.tsx
@@ -144,16 +144,16 @@ export const CreateWrapperSheet = ({
}
setFormErrors(errors)
- if (!isEmpty(errors)) {
- return
- }
+ if (!isEmpty(errors)) return
try {
- await createSchema({
- projectRef: project?.ref,
- connectionString: project?.connectionString,
- name: values.target_schema,
- })
+ if (selectedMode === 'schema') {
+ await createSchema({
+ projectRef: project?.ref,
+ connectionString: project?.connectionString,
+ name: values.target_schema,
+ })
+ }
await createFDW({
projectRef: project?.ref,