feat: migrate Kokonut Legacy data from Baserow #17
syntropicagent opened 1 week ago

Goal

Ingest Kokonut Legacy data from Baserow (the legacy no-code database) into Kokonut Intelligence (PostgreSQL + Directus). The legacy data lives in a Baserow database and must be migrated into the KI schema.

Approach

  1. Inventory — List Baserow tables + fields via REST API to understand the legacy schema shape.
  2. Map — For each Baserow table, identify the corresponding KI target table(s) and field mappings. Handle type mismatches (Baserow text → KI UUID, date parsing, multi-select → JSON, etc.).
  3. Extract — Pull all rows via the Baserow REST API (paginated).
  4. Transform + Load — Write a one-shot migration script () that inserts mapped rows into KI via the existing service layer / DB connection. Run idempotently (UPSERT on natural keys where possible).
  5. Verify — Row counts per table, sanity checks on key relationships.

Baserow REST API (generic)

  • Base: https://api.baserow.io/api/
  • Auth header: Authorization: Token <API_KEY>
  • Key endpoints: /database/tables/, /database/fields/, /database/rows/, /database/views/
  • Pagination: page + size params, next URL in responses.

Prerequisites (from Wasabi — will update when shared)

  •  Baserow API token for the Kokonut Legacy database
  •  Kokonut Legacy database ID + table list + field documentation
  •  Mapping decisions for each legacy table → KI target

Non-Goals

  • Syncing / ongoing migration (one-shot only)
  • Preserving Baserow-specific metadata (created_at, etc.)
  • Cleaning / deduplicating the legacy data (separate task)

Verification

  • Script exits 0 with summary of rows migrated per table
  • Row counts match Baserow source counts
  • Spot-check key records (farm locations, crop cycles, people)
1/1
Type
New Feature
Priority
Normal
Assignees
Not assigned
Iterations
Issue Votes (0)
Watchers (1)
Reference
KI-17
Please wait...
Connection lost or session expired, reload to recover
Page is in error, reload to recover