Skip to content

Add a schema version to persisted project and draft records #137

Description

@imnasnainaec

Persisted records (project:{id}, draft:{sourceProjectId}) have no version field. Today a format change makes old records fail type-guard validation and get skipped (projects) or reset to empty (drafts) — a silent data-loss path.

  • Add modelVersion: number to InterlinearProject and DraftProject in src/types/interlinearizer.d.ts; document that consumers must treat unknown higher versions as read-only/unsupported.
  • Stamp the current version (start at 1) in projectStorage.ts on every write; treat a missing field as version 0 on read.
  • No migration framework yet — just the field and a single CURRENT_MODEL_VERSION constant. Migration logic can be added the first time the shape actually changes.

Size: XS–S

Priority: P1 — cheap now, expensive after #128

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions