INSIGHT-MVP/packages/crm-service/prisma/migrations/20260312_phase23_forecast/migration.sql
Thomas Reitz 63cb05d4d8 feat(crm): Phase 2.2-2.4 backend + contract files — vollständige CRM-Service Implementierung
- Phase 2.3 Forecast: probability-Feld in PipelineStage, GET /crm/deals/forecast Endpoint
- Phase 2.2 Import: ImportModule mit preview/execute/history Endpoints (CSV, XLSX, vCard)
- Phase 2.4 Enrichment: EnrichmentModule mit /enrich + /settings/integrations/north-data
- Contracts: ContractsModule mit CRUD + File-Upload Endpoints (Multer, max 25MB)
- Migrations: 20260312_contract_files, 20260312_phase23_forecast
- docker-compose.crm.yml: uploads Volume für Vertragsdokumente

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-12 22:06:58 +01:00

10 lines
472 B
SQL

-- ============================================================
-- Phase 2.3: Forecast — Wahrscheinlichkeit auf Pipeline-Stufen
-- ============================================================
-- Neue Spalte probability auf pipeline_stages
ALTER TABLE "app_crm"."pipeline_stages"
ADD COLUMN "probability" DECIMAL(3, 2) NOT NULL DEFAULT 0;
COMMENT ON COLUMN "app_crm"."pipeline_stages"."probability"
IS 'Abschlusswahrscheinlichkeit 0.00 bis 1.00 (z.B. 0.75 = 75%)';