-- Product Core removal: Forms, Public Forms, Surveys, and form-based Help Desk surveys are no longer active runtime/schema surfaces. -- Historical migrations remain intact; this migration removes the active tables and relation columns. -- Release note: this is an intentionally destructive Product Core cutover. Operators must export or back up any retained -- form, form submission, form file, survey, or survey submission data before applying this migration to an environment -- that previously accepted customer data through these removed modules. ALTER TABLE "GeneratedObject" DROP CONSTRAINT IF EXISTS "GeneratedObject_formFileId_fkey"; ALTER TABLE "Form" DROP CONSTRAINT IF EXISTS "Form_generatedObjectId_fkey"; ALTER TABLE "Form" DROP CONSTRAINT IF EXISTS "Form_tenantId_fkey"; ALTER TABLE "Form" DROP CONSTRAINT IF EXISTS "Form_createdByUserId_fkey"; ALTER TABLE "Form" DROP CONSTRAINT IF EXISTS "Form_updatedByUserId_fkey"; ALTER TABLE "FormSubmission" DROP CONSTRAINT IF EXISTS "FormSubmission_formId_fkey"; ALTER TABLE "FormSubmission" DROP CONSTRAINT IF EXISTS "FormSubmission_createdByUserId_fkey"; ALTER TABLE "FormSubmission" DROP CONSTRAINT IF EXISTS "FormSubmission_tenantId_fkey"; ALTER TABLE "FormSubmission" DROP CONSTRAINT IF EXISTS "FormSubmission_fromCustomLinkId_fkey"; ALTER TABLE "FormActionLog" DROP CONSTRAINT IF EXISTS "FormActionLog_formActionId_fkey"; ALTER TABLE "FormActionLog" DROP CONSTRAINT IF EXISTS "FormActionLog_formSubmissionId_fkey"; ALTER TABLE "FormAction" DROP CONSTRAINT IF EXISTS "FormAction_formId_fkey"; ALTER TABLE "FormLog" DROP CONSTRAINT IF EXISTS "FormLog_formId_fkey"; ALTER TABLE "FormLog" DROP CONSTRAINT IF EXISTS "FormLog_userId_fkey"; ALTER TABLE "FormTag" DROP CONSTRAINT IF EXISTS "FormTag_formId_fkey"; ALTER TABLE "FormTag" DROP CONSTRAINT IF EXISTS "FormTag_tagId_fkey"; ALTER TABLE "FormsTag" DROP CONSTRAINT IF EXISTS "FormsTag_tenantId_fkey"; ALTER TABLE "FormLink" DROP CONSTRAINT IF EXISTS "FormLink_formId_fkey"; DROP TABLE IF EXISTS "SurveySubmissionResult"; DROP TABLE IF EXISTS "SurveySubmission"; DROP TABLE IF EXISTS "SurveyItem"; DROP TABLE IF EXISTS "Survey"; DROP TABLE IF EXISTS "FormActionLog"; DROP TABLE IF EXISTS "FormAction"; DROP TABLE IF EXISTS "FormLog"; DROP TABLE IF EXISTS "FormTag"; DROP TABLE IF EXISTS "FormsTag"; DROP TABLE IF EXISTS "FormSubmission"; DROP TABLE IF EXISTS "FormLink"; DROP TABLE IF EXISTS "Form"; DROP TABLE IF EXISTS "FormFile"; ALTER TABLE "GeneratedObject" DROP COLUMN IF EXISTS "formFileId";