feat(db): .kc metadata database migration #148
Reference in New Issue
Block a user
Delete Branch "feat/kc-metadata-migration"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #140
Adds
migrations/018_kc_metadata.sqlwith all tables needed for .kc server-side metadata indexing, as specified in KC_SERVER.md Section 3.Tables
item_metadataIndexes
silo/manifest.jsonandsilo/metadata.jsonfrom .kc files. Primary key onitem_id. Stores schema_name, tags (TEXT[]), lifecycle_state, fields (JSONB), kc_version, manifest_uuid, silo_instance, revision_hash.GIN indexes on tags and fields, B-tree on lifecycle_state.
item_dependenciesCAD-extracted assembly dependencies from
silo/dependencies.json. Complements (does not replace) the existingrelationshipstable -- this is the CAD-authoritative record,relationshipsis server-authoritative.item_approvals+approval_signaturesECO workflow tables. Server-authoritative -- the .kc snapshot is a read cache packed on checkout.
item_macrosRegistered macros from
silo/macros/. UNIQUE(item_id, filename).Also included
docs/KC_SERVER.md-- full specification for .kc server-side metadata integrationNotes
gen_random_uuid()consistent with recent migrations