Skip to content

glx migrate

Migrate an archive to the current format

Synopsis

Converts deprecated person properties (born_on, born_at, died_on, died_at, buried_on, buried_at) to birth/death/burial events.

For each person with deprecated properties:

  • Creates a birth, death, or burial event if none exists
  • Merges date/place into existing events if fields are empty
  • Never overwrites existing event data
  • Converts assertions to reference the event instead of the person property

With --rename-gender-to-sex, also renames the legacy gender person property (and any related assertions and inlined vocabulary entries) to sex, completing the two-field-model split introduced in #528.

With --confidence-disputed-to-status, moves the legacy confidence: disputed signal to status: disputed, separating evidence quality (confidence) from conclusion state (status) per #516. Confidence is cleared on each touched assertion; existing non-disputed statuses are preserved with a warning so the user can reconcile by hand.

With --source-description-to-property, moves a Source's legacy top-level description field into properties.description, completing the structural-field-to-vocabulary-property consolidation from #667. An explicit properties.description is never overwritten.

With --media-description-to-property, moves a Media's legacy top-level description field into properties.description, mirroring the Source treatment from #667 for the remaining structural-vs-property inconsistency on Media (#894). An explicit properties.description is never overwritten.

With --rename-ssn-to-national-id, renames the legacy US-centric ssn person property (and any related person-subject assertions and inlined vocabulary definition) to the internationalized national_id per #532. Both keys map to the GEDCOM SSN tag, so GEDCOM import/export is unaffected. A person or vocabulary already carrying national_id is never overwritten.

With --strip-event-title-year, removes the stale (YEAR) suffix that GEDCOM imports before #1026 appended to auto-generated event titles — including the buggy day-as-year form (e.g. Birth of John Smith (15), #1025). A title is only touched when, with the suffix removed, it exactly matches the title import would auto-generate for that event from its type and participant names; other titles are never modified. One caveat: a hand-typed title that is identical to that auto-generated shape including the year is indistinguishable from a stale import title and will also be stripped — the year remains recoverable from the event's date field, where it belongs (#1032).

glx migrate [archive] [flags]

Examples

  # Migrate a multi-file archive
  glx migrate ./my-archive

  # Migrate a single-file archive
  glx migrate archive.glx

  # Also rename legacy 'gender' person properties to 'sex'
  glx migrate ./my-archive --rename-gender-to-sex

  # Also move legacy 'confidence: disputed' to 'status: disputed'
  glx migrate ./my-archive --confidence-disputed-to-status

  # Also move legacy top-level source 'description' into 'properties.description'
  glx migrate ./my-archive --source-description-to-property

  # Also move legacy top-level media 'description' into 'properties.description'
  glx migrate ./my-archive --media-description-to-property

  # Also rename the legacy US-centric 'ssn' person property to 'national_id'
  glx migrate ./my-archive --rename-ssn-to-national-id

  # Also strip the stale (YEAR) suffix from previously-imported event titles
  glx migrate ./my-archive --strip-event-title-year

Options

      --confidence-disputed-to-status    Move legacy 'confidence: disputed' to 'status: disputed' (evidence quality vs conclusion state, #516)
  -h, --help                             help for migrate
      --media-description-to-property    Move legacy top-level media 'description' into 'properties.description' (#894)
      --rename-gender-to-sex             Rename the legacy 'gender' person property to 'sex' (two-field-model split, #528)
      --rename-ssn-to-national-id        Rename the legacy US-centric 'ssn' person property to 'national_id' (#532)
      --source-description-to-property   Move legacy top-level source 'description' into 'properties.description' (#667)
      --strip-event-title-year           Strip the stale '(YEAR)' suffix pre-#1026 imports appended to auto-generated event titles (#1032)

Options inherited from parent commands

  -q, --quiet   Suppress non-error output (where supported)

SEE ALSO

  • glx - GENEALOGIX CLI - Manage and validate genealogy archives

Licensed under Apache License 2.0