feat(db): add source column to relationships table #50
Reference in New Issue
Block a user
Delete Branch "issue-44-bom-source"
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 #44
Promotes BOM source from metadata JSONB to a dedicated
VARCHAR(20)column with CHECK constraint ('manual'or'assembly').Changes
Sourcefield onRelationshipandBOMEntryGetBOM,GetWhereUsed,GetExpandedBOM,Createall includesourceBOMEntryResponse.source,AddBOMEntryRequest.sourcee.Sourceinstead ofgetMetaString(e.Metadata, "source")HandleExportBOMODSandHandleProjectSheetODSBOMEntry.sourcetype,BOMTabreads/writes source as top-level fieldPromote BOM source from metadata JSONB to a dedicated VARCHAR(20) column with CHECK constraint ('manual' or 'assembly'). - Add migration 012_bom_source.sql (column, data migration, cleanup) - Add Source field to Relationship and BOMEntry structs - Update all SQL queries (GetBOM, GetWhereUsed, GetExpandedBOM, Create) - Update API response/request types with source field - Update CSV/ODS export to read e.Source instead of metadata - Update CSV import to set source on relationship directly - Update frontend types and BOMTab to use top-level source field