The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
chore: allow PITR without small compute addon (#50699)
K-Dog (Kevin)cee7461a9ab7
diff --git a/apps/studio/components/interfaces/DiskManagement/fields/ComputeSizeField.tsx b/apps/studio/components/interfaces/DiskManagement/fields/ComputeSizeField.tsxindex f4fe245d481..93e50c91dc4 100644--- a/apps/studio/components/interfaces/DiskManagement/fields/ComputeSizeField.tsx+++ b/apps/studio/components/interfaces/DiskManagement/fields/ComputeSizeField.tsx@@ -29,7 +29,6 @@ import { BillingChangeBadge } from '../ui/BillingChangeBadge'import FormMessage from '../ui/FormMessage'import { useShowMicroUpgradeBadge } from './useShowMicroUpgradeBadge'import { SupportLink } from '@/components/interfaces/Support/SupportLink'-import { InlineLink } from '@/components/ui/InlineLink'import { useProjectAddonsQuery } from '@/data/subscriptions/project-addons-query'import { useHighAvailability } from '@/hooks/misc/useHighAvailability'import { useIsFeatureEnabled } from '@/hooks/misc/useIsFeatureEnabled'@@ -113,8 +112,6 @@ export function ComputeSizeField({ form, disabled }: ComputeSizeFieldProps) {return getAvailableComputeOptions(availableAddons, project?.cloud_provider)}, [availableAddons, project?.cloud_provider])- const subscriptionPitr = addons?.selected_addons.find((addon) => addon.type === 'pitr')-const showSkeletons = isLoadingconst showLoadError = !isLoading && !!addonsErrorconst showComputeOptions = !isLoading && !addonsError@@ -152,8 +149,6 @@ export function ComputeSizeField({ form, disabled }: ComputeSizeFieldProps) {{showComputeOptions && (<>{availableOptions.map((compute) => {- const lockedMicroDueToPITR =- compute.identifier === 'ci_micro' && !!subscriptionPitrconst lockedNanoDueToPlan =org?.plan.id !== 'free' &&project?.infra_compute_size !== 'nano' &&@@ -161,8 +156,7 @@ export function ComputeSizeField({ form, disabled }: ComputeSizeFieldProps) {const lockedDueToHighAvailability =isHighAvailability && compute.identifier !== currentComputeVariantId- const lockedOption =- lockedNanoDueToPlan || lockedMicroDueToPITR || lockedDueToHighAvailability+ const lockedOption = lockedNanoDueToPlan || lockedDueToHighAvailability// Nano on a paid plan is billed at the Micro rateconst isNanoBilledAsMicro =@@ -282,16 +276,6 @@ export function ComputeSizeField({ form, disabled }: ComputeSizeFieldProps) {Alpha</TooltipContent>)}- {!lockedDueToHighAvailability && lockedMicroDueToPITR && (- <TooltipContent side="bottom" className="w-64 text-center">- Project has PITR enabled which requires a minimum of Small compute.- Please{' '}- <InlineLink href="/project/_/settings/addons?panel=pitr">- disable PITR- </InlineLink>{' '}- first before selecting Micro- </TooltipContent>- )}</Tooltip>}/>diff --git a/apps/studio/components/interfaces/Settings/Addons/PITRSidePanel.tsx b/apps/studio/components/interfaces/Settings/Addons/PITRSidePanel.tsxindex 7975522ae11..5e36400a1e0 100644--- a/apps/studio/components/interfaces/Settings/Addons/PITRSidePanel.tsx+++ b/apps/studio/components/interfaces/Settings/Addons/PITRSidePanel.tsx@@ -101,15 +101,12 @@ const PITRSidePanel = () => {const selectedAddons = addons?.selected_addons ?? []const availableAddons = addons?.available_addons ?? []- const subscriptionCompute = selectedAddons.find((addon) => addon.type === 'compute_instance')const subscriptionPitr = selectedAddons.find((addon) => addon.type === 'pitr')const availableOptions = availableAddons.find((addon) => addon.type === 'pitr')?.variants ?? []const hasChanges = selectedOption !== (subscriptionPitr?.variant.identifier ?? 'pitr_0')const { hasAccess: hasAccessToPitrVariants } = useCheckEntitlements('pitr.available_variants')const selectedPitr = availableOptions.find((option) => option.identifier === selectedOption)- const hasSufficientCompute =- !!subscriptionCompute && subscriptionCompute.variant.identifier !== 'ci_micro'// These are illegal states. If they are true, we should block the user from saving them.const blockDowngradeDueToHipaa =@@ -153,7 +150,6 @@ const PITRSidePanel = () => {!hasChanges ||isSubmitting ||!canUpdatePitr ||- (!!selectedPitr && !hasSufficientCompute) ||(blockDowngradeDueToHipaa ?? undefined)}tooltip={@@ -269,14 +265,6 @@ const PITRSidePanel = () => {secondaryText="Upgrade your plan to change PITR for your project."featureProposition="enable PITR"/>- ) : !hasSufficientCompute ? (- <UpgradeToPro- className="mb-4"- addon="computeSize"- primaryText="Project needs to be at least on a Small compute size to enable PITR"- secondaryText="This ensures enough resources to execute PITR successfully."- featureProposition="enable PITR"- />) : null}<label className="block text-sm text-foreground-light mb-4" htmlFor="pitr">@@ -287,7 +275,7 @@ const PITRSidePanel = () => {className="flex flex-wrap gap-3"value={selectedOption}onValueChange={(value) => setSelectedOption(value)}- disabled={!hasAccessToPitrVariants || subscriptionCompute === undefined}+ disabled={!hasAccessToPitrVariants}>{availableOptions.map((option) => (<RadioGroupCardItem