ProtectedSchemaWarning() — supabase Function Reference
Architecture documentation for the ProtectedSchemaWarning() function in ProtectedSchemaWarning.tsx from the supabase codebase.
Entity Profile
Relationship Graph
Source Code
apps/studio/components/interfaces/Database/ProtectedSchemaWarning.tsx lines 57–116
export const ProtectedSchemaWarning = ({
size = 'md',
schema,
entity,
}: {
size?: 'sm' | 'md'
schema: string
entity: string
}) => {
const [showModal, setShowModal] = useState(false)
const { isSchemaLocked, reason, fdwType } = useIsProtectedSchema({ schema })
if (!isSchemaLocked) return null
const showLearnMoreDialog =
reason !== 'fdw' || (fdwType !== 'iceberg' && fdwType !== 's3_vectors')
return (
<Admonition
showIcon={size === 'sm' ? false : true}
layout={size === 'sm' ? 'vertical' : 'horizontal'}
type="note"
title={
size === 'sm' ? `Viewing protected schema` : `Viewing ${entity} from a protected schema`
}
description={
reason === 'fdw' && fdwType === 'iceberg' ? (
<p>
The <code className="text-code-inline">{schema}</code> schema is used by Supabase to
connect to analytics buckets and is read-only through the dashboard.
</p>
) : reason === 'fdw' && fdwType === 's3_vectors' ? (
<p>
The <code className="text-code-inline">{schema}</code> schema is used by Supabase to
connect to vector buckets and is read-only through the dashboard.
</p>
) : (
<p>
The <code className="text-code-inline">{schema}</code> schema is managed by Supabase and
is read-only through the dashboard.
</p>
)
}
actions={
showLearnMoreDialog && (
<Dialog open={showModal} onOpenChange={setShowModal}>
<DialogTrigger asChild>
<Button type="default" size="tiny" onClick={() => setShowModal(true)}>
Learn more
</Button>
</DialogTrigger>
<DialogContent>
<ProtectedSchemaDialog onClose={() => setShowModal(false)} />
</DialogContent>
</Dialog>
)
}
/>
)
}
Domain
Subdomains
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free