feat(parcel-sync): sync-first architecture — DB as ground truth

- Rewrite export-bundle to sync-first: check freshness -> sync layers -> enrich (magic) -> build GPKG/CSV from local DB
- Rewrite export-layer-gpkg to sync-first: sync if stale -> export from DB
- Create enrich-service.ts: extracted magic enrichment logic (CF, owners, addresses) with DB storage
- Add enrichment + enrichedAt columns to GisFeature schema
- Update PostGIS views to include enrichment data
- UI: update button labels for sync-first semantics, refresh sync status after exports
- Smart caching: skip sync if data is fresh (168h / 1 week default)
This commit is contained in:
AI Assistant
2026-03-07 11:12:54 +02:00
parent 0d0b1f8c9f
commit b0927ee075
7 changed files with 898 additions and 698 deletions
+2
View File
@@ -78,6 +78,8 @@ SELECT
"areaValue" AS area_value,
"isActive" AS is_active,
attributes,
enrichment,
"enrichedAt" AS enriched_at,
"projectId" AS project_id,
"createdAt" AS created_at,
"updatedAt" AS updated_at,