MEGAINFRA-WEBAPP/scripts/migrations
DEls f007b5e8fb feat(schema): require site on every ingested collection
Tightened site from optional to required on fuel_logs, timesheet_entries,
delivery_notes and purchase_orders now that every route writes it and
every historical row has been backfilled. plant_hours_log was already
required (matches docs/data-model.md's documented invariant, confirmed
against production). timesheets (the document collection) was already
required from Task 6 -- a no-op here, not a regression.

fuel_sheets.site and plant_hours_sheets.site deliberately stay optional:
those sheets can legitimately span multiple sites.

Verified: creating a fuel_logs row with no site now gets a hard 400
(validation_required) from PocketBase itself.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-11 15:32:48 +02:00
..
2026-08-19-extend-data-import-batches.py
2026-08-24-data-import-batches-allow-xlsx.py fix(data-import-batches): allow xlsx MIME on original_file 2026-08-24 22:17:45 +02:00
2026-08-24-fuel-logs-latest-consumption.py
2026-08-28-vehicles-attention-dismissed.py feat(fuel): PB schema migration for attention_dismissed_at 2026-08-28 12:26:23 +02:00
2026-08-28-vehicles-unit-type-optional.py fix(pb): make vehicles.unit_type optional 2026-08-28 15:26:33 +02:00
2026-08-29-fixed-costs-recurring-backfill.py fix(schema): ensure is_recurring=false writes are preserved 2026-08-28 13:43:38 +02:00
2026-08-31-data-import-batches-allow-pdf-images.py fix(pb): allow PDF and image MIME on data_import_batches.original_file 2026-08-31 12:20:41 +02:00
2026-09-11-add-document-fields.py feat(schema): add file_hash and queue fields to DNs and POs 2026-09-11 10:29:10 +02:00
2026-09-11-backfill-entity-file-hashes.py fix(migration): separate download failures from missing files 2026-09-11 10:39:54 +02:00
2026-09-11-backfill-fuel-log-sites.py fix(fuel): backfill site on 147 orphaned fuel logs 2026-09-11 10:44:19 +02:00
2026-09-11-backfill-timesheet-sites.py fix(timesheets): stamp site on log rows, ending read-time drift 2026-09-11 10:48:51 +02:00
2026-09-12-add-po-date-uploaded.py fix(purchasing): restore the 30-day PO dedup window with a real timestamp 2026-09-11 14:17:42 +02:00
2026-09-12-create-document-collections.py feat(schema): add timesheets, fuel_sheets, plant_hours_sheets documents 2026-09-11 11:09:14 +02:00
2026-09-12-migrate-batches-to-documents.py feat(migration): move batch files into document collections 2026-09-11 13:06:40 +02:00
2026-09-12-rename-collections.py refactor(schema): rename received_items and timesheets to their real names 2026-09-11 11:01:40 +02:00
2026-09-12-widen-sheet-mimetypes.py feat(schema): add timesheets, fuel_sheets, plant_hours_sheets documents 2026-09-11 11:09:14 +02:00
2026-09-14-require-site.py feat(schema): require site on every ingested collection 2026-09-11 15:32:48 +02:00