From b1ad7649f3dd5c8cb571e51e33e14266e3f4b1f0 Mon Sep 17 00:00:00 2001 From: Francesco Sansalvadore Date: Thu, 19 Jun 2025 13:01:41 +0200 Subject: [PATCH 1/3] db report (#36516) * release new charts to Teams and Enterprise plans * remove negation --- apps/studio/pages/project/[ref]/reports/database.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/studio/pages/project/[ref]/reports/database.tsx b/apps/studio/pages/project/[ref]/reports/database.tsx index 8ada04517a0ad..7e88300548970 100644 --- a/apps/studio/pages/project/[ref]/reports/database.tsx +++ b/apps/studio/pages/project/[ref]/reports/database.tsx @@ -60,10 +60,13 @@ export default DatabaseReport const DatabaseUsage = () => { const { db, chart, ref } = useParams() const { project } = useProjectContext() - const showChartsV2 = useFlag('reportsDatabaseV2') + const isReportsV2 = useFlag('reportsDatabaseV2') const org = useSelectedOrganization() const { plan: orgPlan, isLoading: isOrgPlanLoading } = useCurrentOrgPlan() const isFreePlan = !isOrgPlanLoading && orgPlan?.id === 'free' + const isTeamsOrEnterprisePlan = + !isOrgPlanLoading && (orgPlan?.id === 'team' || orgPlan?.id === 'enterprise') + const showChartsV2 = isReportsV2 || isTeamsOrEnterprisePlan const state = useDatabaseSelectorStateSnapshot() const defaultStart = dayjs().subtract(1, 'day').toISOString() From 380a55e9bf8b6e49157f28f5dc4466d505cf1658 Mon Sep 17 00:00:00 2001 From: Tristan Smith <67556218+TJLSmith0831@users.noreply.github.com> Date: Thu, 19 Jun 2025 08:53:53 -0500 Subject: [PATCH 2/3] docs: clarify that migrations must be applied manually after starting local DB (#36511) docs: clarify manual migration step after starting local database (fix supabase#35078) --- .../local-development/declarative-database-schemas.mdx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/docs/content/guides/local-development/declarative-database-schemas.mdx b/apps/docs/content/guides/local-development/declarative-database-schemas.mdx index 6787f77ba8af5..54076678dce51 100644 --- a/apps/docs/content/guides/local-development/declarative-database-schemas.mdx +++ b/apps/docs/content/guides/local-development/declarative-database-schemas.mdx @@ -74,7 +74,7 @@ supabase db diff -f create_employees_table - Start the local database and then apply the migration file to see your schema changes in the local Dashboard. + Start the local database first. Then, apply the migration manually to see your schema changes in the local Dashboard. @@ -82,7 +82,8 @@ supabase db diff -f create_employees_table <$CodeTabs> ```bash name=Terminal -supabase start && supabase migration up +supabase start +supabase migration up ``` From 5cc2617b5f8eeb361e9e5b7f7084109188298714 Mon Sep 17 00:00:00 2001 From: Charis <26616127+charislam@users.noreply.github.com> Date: Thu, 19 Jun 2025 10:54:43 -0400 Subject: [PATCH 3/3] fix(docs): add more descriptive error message (#36536) --- apps/docs/resources/error/errorResolver.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/apps/docs/resources/error/errorResolver.ts b/apps/docs/resources/error/errorResolver.ts index 6cced10660035..d64a059ac70a9 100644 --- a/apps/docs/resources/error/errorResolver.ts +++ b/apps/docs/resources/error/errorResolver.ts @@ -6,7 +6,7 @@ import type { RootQueryTypeErrorsArgs, Service, } from '~/__generated__/graphql' -import { ApiError, convertUnknownToApiError } from '~/app/api/utils' +import { ApiError, convertUnknownToApiError, extractMessageFromAnyError } from '~/app/api/utils' import { Result } from '~/features/helpers.fn' import { createCollectionType, @@ -77,7 +77,13 @@ async function resolveErrors( code: args[0].code ?? undefined, }, }) - return result.mapError((error) => new ApiError('Failed to resolve error codes', error)) + return result.mapError( + (error) => + new ApiError( + `Failed to resolve error codes: ${extractMessageFromAnyError(error)}`, + error + ) + ) } return await GraphQLCollectionBuilder.create< ErrorModel,