-- 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);