From 839144d338de449b339d43d75f55ccf2d531a1f5 Mon Sep 17 00:00:00 2001 From: Matti Nannt Date: Fri, 12 Sep 2025 11:01:03 +0200 Subject: [PATCH] chore: remove unused fields and tables from prisma schema (#6531) Co-authored-by: Dhruwang --- .../components/ConnectWithFormbricks.test.tsx | 12 +- .../components/ConnectWithFormbricks.tsx | 14 +- .../OnboardingSetupInstructions.test.tsx | 2 +- .../OnboardingSetupInstructions.tsx | 6 +- .../[environmentId]/connect/page.tsx | 2 +- .../components/PosthogIdentify.test.tsx | 6 - .../components/PosthogIdentify.tsx | 4 - .../project/integrations/page.test.tsx | 2 +- .../project/integrations/page.tsx | 6 +- .../components/ResponsePage.test.tsx | 1 - .../(analysis)/responses/page.test.tsx | 1 - .../summary/components/SuccessMessage.tsx | 8 +- .../summary/components/SurveyAnalysisCTA.tsx | 4 +- .../anonymous-links-tab.test.tsx | 1 - .../components/SurveyStatusDropdown.test.tsx | 1 - .../displays/lib/display.test.ts | 2 - apps/web/app/api/v1/management/me/route.ts | 4 +- .../displays/lib/display.test.ts | 2 - apps/web/app/lib/survey-builder.test.ts | 2 - apps/web/app/lib/survey-builder.ts | 4 +- apps/web/app/lib/templates.ts | 49 ---- apps/web/lib/display/service.ts | 1 - .../lib/display/tests/__mocks__/data.mock.ts | 1 - apps/web/lib/environment/service.test.ts | 4 - apps/web/lib/i18n/i18n.mock.ts | 8 - apps/web/lib/responses.test.ts | 1 - apps/web/lib/survey/__mock__/survey.mock.ts | 6 - apps/web/lib/survey/service.ts | 2 - apps/web/lib/user/service.test.ts | 4 +- apps/web/lib/user/service.ts | 2 - apps/web/lib/utils/helper.test.ts | 95 ------- apps/web/lib/utils/helper.ts | 47 ---- apps/web/lib/utils/services.test.ts | 58 ----- apps/web/lib/utils/services.ts | 48 ---- .../components/ShareSurveyLink/index.test.tsx | 1 - .../v2/management/surveys/types/surveys.ts | 4 - apps/web/modules/auth/lib/mock-data.ts | 2 - .../components/response-feed.test.tsx | 9 - .../lib/tests/__mock__/sso-handlers.mock.ts | 2 - .../components/template-list/lib/user.test.ts | 4 - .../components/template-list/lib/user.ts | 2 - .../components/open-question-form.test.tsx | 2 - .../editor/components/question-card.test.tsx | 1 - apps/web/modules/survey/editor/lib/survey.ts | 2 - .../modules/survey/editor/lib/utils.test.tsx | 6 - .../survey/editor/lib/validation.test.ts | 1 - apps/web/modules/survey/lib/project.test.ts | 1 - apps/web/modules/survey/link/lib/data.test.ts | 13 - .../web/modules/survey/link/lib/utils.test.ts | 6 - .../ui/components/preview-survey/index.tsx | 4 +- .../question-toggle-table/index.test.tsx | 3 - apps/web/playwright/survey.spec.ts | 16 +- apps/web/playwright/utils/helper.ts | 18 -- apps/web/playwright/utils/mock.ts | 20 +- docs/api-reference/openapi.json | 4 +- docs/api-v2-reference/openapi.yml | 24 -- .../technical-handbook/database-model.mdx | 3 - packages/database/README.md | 241 ++++++++++++++++++ .../20250818052302_add_quotas/migration.sql | 2 +- .../migration.sql | 107 ++++++++ packages/database/schema.prisma | 225 ++++------------ packages/database/zod/surveys.ts | 17 -- .../src/components/general/survey.test.tsx | 2 - packages/types/displays.ts | 1 - packages/types/templates.ts | 2 - packages/types/user.ts | 18 -- 66 files changed, 440 insertions(+), 733 deletions(-) create mode 100644 packages/database/README.md create mode 100644 packages/database/migration/20250911192630_remove_deprecated_fields_and_tables/migration.sql diff --git a/apps/web/app/(app)/(onboarding)/environments/[environmentId]/connect/components/ConnectWithFormbricks.test.tsx b/apps/web/app/(app)/(onboarding)/environments/[environmentId]/connect/components/ConnectWithFormbricks.test.tsx index a0d9d0e4ef..ea8770dbdb 100644 --- a/apps/web/app/(app)/(onboarding)/environments/[environmentId]/connect/components/ConnectWithFormbricks.test.tsx +++ b/apps/web/app/(app)/(onboarding)/environments/[environmentId]/connect/components/ConnectWithFormbricks.test.tsx @@ -23,12 +23,12 @@ describe("ConnectWithFormbricks", () => { const webAppUrl = "http://app"; const channel = {} as any; - test("renders waiting state when widgetSetupCompleted is false", () => { + test("renders waiting state when appSetupCompleted is false", () => { render( ); @@ -36,12 +36,12 @@ describe("ConnectWithFormbricks", () => { expect(screen.getByText("environments.connect.waiting_for_your_signal")).toBeInTheDocument(); }); - test("renders success state when widgetSetupCompleted is true", () => { + test("renders success state when appSetupCompleted is true", () => { render( ); @@ -54,7 +54,7 @@ describe("ConnectWithFormbricks", () => { ); @@ -68,7 +68,7 @@ describe("ConnectWithFormbricks", () => { ); diff --git a/apps/web/app/(app)/(onboarding)/environments/[environmentId]/connect/components/ConnectWithFormbricks.tsx b/apps/web/app/(app)/(onboarding)/environments/[environmentId]/connect/components/ConnectWithFormbricks.tsx index f0c6b91bf6..4adb4efa7f 100644 --- a/apps/web/app/(app)/(onboarding)/environments/[environmentId]/connect/components/ConnectWithFormbricks.tsx +++ b/apps/web/app/(app)/(onboarding)/environments/[environmentId]/connect/components/ConnectWithFormbricks.tsx @@ -13,14 +13,14 @@ import { OnboardingSetupInstructions } from "./OnboardingSetupInstructions"; interface ConnectWithFormbricksProps { environment: TEnvironment; publicDomain: string; - widgetSetupCompleted: boolean; + appSetupCompleted: boolean; channel: TProjectConfigChannel; } export const ConnectWithFormbricks = ({ environment, publicDomain, - widgetSetupCompleted, + appSetupCompleted, channel, }: ConnectWithFormbricksProps) => { const { t } = useTranslate(); @@ -51,15 +51,15 @@ export const ConnectWithFormbricks = ({ environmentId={environment.id} publicDomain={publicDomain} channel={channel} - widgetSetupCompleted={widgetSetupCompleted} + appSetupCompleted={appSetupCompleted} />
- {widgetSetupCompleted ? ( + {appSetupCompleted ? (

{t("environments.connect.congrats")}

@@ -81,9 +81,9 @@ export const ConnectWithFormbricks = ({