Files
tilbudgivern/database/migrations/20260901_roof_geometry_material.sql
Alexandalexpolo1 8b16d35287
CI - Test & Build / E2E Tests (Playwright) (push) Blocked by required conditions
CI - Test & Build / CI Summary (push) Blocked by required conditions
CI - Test & Build / Lint & Type Check (push) Successful in 29m38s
CI - Test & Build / Backend Unit Tests (push) Failing after 1m1s
CI - Test & Build / Frontend Build (push) Successful in 21m17s
CI - Test & Build / Security Scan (push) Successful in 20m2s
fix: keep Smart Packages compatible with roof material (#30)
Co-authored-by: alexpolo1 <[email protected]>
2026-09-02 07:19:39 +02:00

11 lines
481 B
SQL

-- Persist the roof covering selected in Enhanced Geometry so Smart Package
-- recommendations cannot fall back to an incompatible historical roof type.
ALTER TABLE roof_geometry
ADD COLUMN IF NOT EXISTS roof_material ENUM('tegl','tagpap','eternit','betontag','staal','andet') NULL
AFTER roof_type;
CREATE INDEX IF NOT EXISTS idx_roof_geometry_material ON roof_geometry (roof_material);
ALTER TABLE roof_geometry
ADD UNIQUE INDEX IF NOT EXISTS unique_project (project_id);