diff --git a/supabase/_async/client.py b/supabase/_async/client.py index ad21c7cd..7fc722f6 100644 --- a/supabase/_async/client.py +++ b/supabase/_async/client.py @@ -129,11 +129,7 @@ def schema(self, schema: str) -> AsyncPostgrestClient: The schema needs to be on the list of exposed schemas inside Supabase. """ - if self.options.schema != schema: - self.options.schema = schema - if self._postgrest: - self._postgrest.schema(schema) - return self.postgrest + return self.postgrest.schema(schema) def from_(self, table_name: str) -> AsyncRequestBuilder: """Perform a table operation. diff --git a/supabase/_sync/client.py b/supabase/_sync/client.py index 680a7aea..d8da3a09 100644 --- a/supabase/_sync/client.py +++ b/supabase/_sync/client.py @@ -128,11 +128,7 @@ def schema(self, schema: str) -> SyncPostgrestClient: The schema needs to be on the list of exposed schemas inside Supabase. """ - if self.options.schema != schema: - self.options.schema = schema - if self._postgrest: - self._postgrest.schema(schema) - return self.postgrest + return self.postgrest.schema(schema) def from_(self, table_name: str) -> SyncRequestBuilder: """Perform a table operation.