The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
fix: include enterprise for log query limits
TzeYiingb3b587768c2d
diff --git a/studio/components/interfaces/Billing/Subscription/Subscription.types.ts b/studio/components/interfaces/Billing/Subscription/Subscription.types.tsindex 92efce4c65c..edc54c9b96a 100644--- a/studio/components/interfaces/Billing/Subscription/Subscription.types.ts+++ b/studio/components/interfaces/Billing/Subscription/Subscription.types.ts@@ -14,4 +14,5 @@ export interface StripeProduct {price_id?: stringunit_amount: numbersupabase_prod_id: string+ key: string}diff --git a/studio/components/interfaces/Settings/Logs/Logs.constants.ts b/studio/components/interfaces/Settings/Logs/Logs.constants.tsindex af7cd0d5afb..4c0740a1812 100644--- a/studio/components/interfaces/Settings/Logs/Logs.constants.ts+++ b/studio/components/interfaces/Settings/Logs/Logs.constants.ts@@ -471,9 +471,10 @@ export const getDefaultHelper = (helpers: DatetimeHelper[]) =>helpers.find((helper) => helper.default) || helpers[0]export const TIER_QUERY_LIMITS: {- [x: string]: { text: string; value: 1 | 7 | 3; unit: 'day' | 'month' }+ [x: string]: { text: string; value: 1 | 7 | 90; unit: 'day', promptUpgrade: boolean }} = {- FREE: { text: '1 day', value: 1, unit: 'day' },- PRO: { text: '7 days', value: 7, unit: 'day' },- PAYG: { text: '3 months', value: 3, unit: 'month' },+ FREE: { text: '1 day', value: 1, unit: 'day', promptUpgrade: true },+ PRO: { text: '7 days', value: 7, unit: 'day', promptUpgrade: true },+ PAYG: { text: '90 days', value: 90, unit: 'day', promptUpgrade: false },+ ENTERPRISE: { text: '90 days', value: 90, unit: 'day', promptUpgrade: false },}diff --git a/studio/components/interfaces/Settings/Logs/UpgradePrompt.tsx b/studio/components/interfaces/Settings/Logs/UpgradePrompt.tsxindex b038802c768..bfd2f0d32d3 100644--- a/studio/components/interfaces/Settings/Logs/UpgradePrompt.tsx+++ b/studio/components/interfaces/Settings/Logs/UpgradePrompt.tsx@@ -19,16 +19,7 @@ const UpgradePrompt: React.FC<Props> = ({ projectRef, from }) => {if (isError) console.error('Error fetching project subscription')const tier = subscription?.tier- const tierSupabaseProdId = tier?.supabase_prod_id.toLowerCase()- const queryLimitKey = Object.keys(TIER_QUERY_LIMITS).find((key) =>- tierSupabaseProdId?.includes(key.toLowerCase())- )-- if (tier && !queryLimitKey) {- console.error('Tier is unknown, defaulting to Free')- }-- const queryLimit = TIER_QUERY_LIMITS[(queryLimitKey || 'FREE') as keyof typeof TIER_QUERY_LIMITS]+ const queryLimit = TIER_QUERY_LIMITS[(tier?.key || 'FREE') as keyof typeof TIER_QUERY_LIMITS]const fromValue = from ? dayjs(from) : dayjs()const fromMax = dayjs().startOf('day').subtract(queryLimit.value, queryLimit.unit)@@ -50,7 +41,7 @@ const UpgradePrompt: React.FC<Props> = ({ projectRef, from }) => {className="text-scale-1100 hover:text-scale-1200 cursor-pointer transition"onClick={() => setShowHelperModal(true)}/>- {!tierSupabaseProdId?.includes('payg') && (+ {queryLimit.promptUpgrade && (<Link href={`/project/${projectRef}/settings/billing`}><Button size="tiny">Upgrade</Button></Link>