mirror of
https://github.com/supabase/supabase.git
synced 2026-05-09 02:09:50 -04:00
4a0bb36ca8
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
32 lines
1.0 KiB
TypeScript
32 lines
1.0 KiB
TypeScript
import Link from 'next/link'
|
|
import { Button } from 'ui'
|
|
import { Admonition } from 'ui-patterns/admonition'
|
|
|
|
import { useSelectedProjectQuery } from '@/hooks/misc/useSelectedProject'
|
|
|
|
interface UpgradeDatabaseAlertProps {
|
|
minimumVersion?: string
|
|
}
|
|
|
|
export const UpgradeDatabaseAlert = ({ minimumVersion = '15.6' }: UpgradeDatabaseAlertProps) => {
|
|
const { data: project } = useSelectedProjectQuery()
|
|
|
|
return (
|
|
<Admonition
|
|
type="default"
|
|
title="Database upgrade needed"
|
|
childProps={{ description: { className: 'flex flex-col gap-y-2' } }}
|
|
>
|
|
<div className="prose text-sm max-w-full">
|
|
<p>
|
|
This integration requires the <code>pgmq</code> extension which is not available on this
|
|
version of Postgres. The extension is available on version {minimumVersion} and higher.
|
|
</p>
|
|
</div>
|
|
<Button color="primary" className="w-fit">
|
|
<Link href={`/project/${project?.ref}/settings/infrastructure`}>Upgrade database</Link>
|
|
</Button>
|
|
</Admonition>
|
|
)
|
|
}
|