zov-tech/backend-py
wasrusgen f64a64e834 feat: canonicalize Measurements schema on startup + full column-order repair
_ensure_measurements_sheet() now:
1. Creates sheet with canonical headers if missing
2. Adds any missing columns
3. If column ORDER doesn't match _measurement_columns() — migrates all
   data rows in-place: reads by column name, rewrites in canonical order

@app.on_event("startup") calls _ensure_measurements_sheet() via
asyncio.to_thread so column order is always corrected on deploy,
not just on first client_create.

This guarantees append_named_row() always finds columns in expected
positions, eliminating the silent data-in-wrong-column bug.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-16 11:00:52 +03:00
..
app feat: canonicalize Measurements schema on startup + full column-order repair 2026-05-16 11:00:52 +03:00
.dockerignore feat(infra): Python FastAPI backend + Docker compose for VPS deploy (GigaChat with Russian root CA) 2026-05-10 17:44:21 +03:00
Dockerfile backend: Playwright + Chromium for JS-rendered sites (Я.Маркет, OZON fallback) 2026-05-11 13:25:05 +03:00
requirements.txt feat: warehouse module — ОТГРУЗКИ.xlsx в дашборде менеджера 2026-05-16 07:21:23 +03:00
seed_test_clients.py seed_test_clients: 4 тестовые заявки в разных статусах 2026-05-13 19:59:39 +03:00