docs(specs): improve spec 002 based on expert review #133

Merged
addison merged 11 commits from exe-dev-bot/karriba:spec/002-core-entities-schema-improvements into main 2026-01-31 16:58:27 -05:00
Collaborator

Summary

Improves spec 002 (Core Entities Schema) based on expert review focused on decentralized sync viability.

Changes

ID System

  • UUIDv7 for all entities (core and module-specific) to support offline sync
  • Added UUID migration subsection with staged approach

Unique Constraints

  • Removed unique name constraints from all entities to avoid sync conflicts
  • Added design decision documenting rationale (merge functionality deferred)

Season Entity

  • Made status computed (not stored)
  • Added missing archived_at field

Equipment Entity

  • Removed from spec 002 (deferred to future spec)

Foreign Key Behavior

  • Added explicit FK delete rules aligned with archive policy

Terminology Alignment

  • Updated specs 001, 003, 006, 009, 010, 016, 017 to use Parcel/Farm consistently
  • Removed Equipment UI section from spec 003

Migration Tasks

  • Updated migration steps to include UUID conversion
  • Removed duplicate-name handling (no longer needed without unique constraints)
  • Kept normalization (trim + case-fold) for initial entity migration only

Scope

  • Added note that pesticide tables remain module-specific (spec 005)
## Summary Improves spec 002 (Core Entities Schema) based on expert review focused on decentralized sync viability. ## Changes ### ID System - **UUIDv7 for all entities** (core and module-specific) to support offline sync - Added UUID migration subsection with staged approach ### Unique Constraints - **Removed unique name constraints** from all entities to avoid sync conflicts - Added design decision documenting rationale (merge functionality deferred) ### Season Entity - Made `status` computed (not stored) - Added missing `archived_at` field ### Equipment Entity - Removed from spec 002 (deferred to future spec) ### Foreign Key Behavior - Added explicit FK delete rules aligned with archive policy ### Terminology Alignment - Updated specs 001, 003, 006, 009, 010, 016, 017 to use Parcel/Farm consistently - Removed Equipment UI section from spec 003 ### Migration Tasks - Updated migration steps to include UUID conversion - Removed duplicate-name handling (no longer needed without unique constraints) - Kept normalization (trim + case-fold) for initial entity migration only ### Scope - Added note that pesticide tables remain module-specific (spec 005)
Co-authored-by: Shelley <shelley@exe.dev>
Co-authored-by: Shelley <shelley@exe.dev>
Co-authored-by: Shelley <shelley@exe.dev>
Co-authored-by: Shelley <shelley@exe.dev>
Co-authored-by: Shelley <shelley@exe.dev>
Co-authored-by: Shelley <shelley@exe.dev>
Co-authored-by: Shelley <shelley@exe.dev>
Co-authored-by: Shelley <shelley@exe.dev>
Co-authored-by: Shelley <shelley@exe.dev>
Co-authored-by: Shelley <shelley@exe.dev>
Co-authored-by: Shelley <shelley@exe.dev>
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
kwila/karriba!133
No description provided.