GPS (latitude/longitude) and photo_path are now NEVER set by seed
import pipelines, even if empty. GPS comes only from field tech
check-ins via the main app.
- db_writer.py: FIELDS_NEVER_FROM_SEED set, GPS always None in
_extract_row_values, skipped in update mode
- sync.py: latitude/longitude set to None in asset_data
- FIELD_MAP.md: updated policy table
Changes behavior: ALL fields now use ONLY_IF_EMPTY
policy for existing assets. Previously, AUTO fields (name, make, model,
company, place, building_name, floor, etc.) always overwrote existing
data, clobbering MSFS-synced and manually-cleaned records.
- db_writer.py: update() treats every field as 'skip if existing
value non-null' — same as old PRESERVE behavior but universal
- sync.py: UPDATE path now fetches current values and only sets
fields that are currently NULL/empty
- New assets (not found by machine_id) still insert with full seed data
- sync.py docstring and stats output updated to reflect new policy
Closes#13 — seed import no longer overwrites MSFS data
- New sync.py: reads seed import's 39-col schema, maps to main app's
customers/locations/assets schema with foreign keys
- New POST /api/sync endpoint (target=dev|prod, dry_run=true/false)
- New GET /api/sync/targets endpoint
- Category mapping: Bev→Beverage, Snack→Snack, Food→Food, etc.
- Automatically creates customers and locations from company/place
- Idempotent: updates existing assets by machine_id
- Dry-run mode: preview changes without writing