## Why
Some Microsoft Graph / Intune identifiers are not UUIDs (e.g. scope tag id "0"). With `inventory_links.source_id` / `target_id` typed as `uuid`, PostgreSQL fails when inventory dependency extraction tries to persist those edges.
## What
- PostgreSQL migration changes `inventory_links.source_id` and `inventory_links.target_id` to `text`.
- Regression test ensures a non-UUID id ("0") can be persisted; on pgsql it also asserts the columns are `text`.
## Notes
- UUID identifiers continue to work (stored as strings).
- No UI/Filament changes.
## Testing
- `vendor/bin/sail artisan test --compact tests/Feature/Inventory/InventoryLinksNonUuidIdsTest.php`
Co-authored-by: Ahmed Darrazi <ahmeddarrazi@MacBookPro.fritz.box>
Reviewed-on: #96
20 lines
654 B
Markdown
20 lines
654 B
Markdown
# Plan: Inventory links support non-UUID IDs
|
|
|
|
**Branch**: `079-inventory-links-non-uuid-ids`
|
|
**Date**: 2026-02-07
|
|
|
|
## Approach
|
|
|
|
- Add a PostgreSQL migration to change `inventory_links.source_id` and `inventory_links.target_id` from `uuid` to `text`.
|
|
- Add a pgsql-specific test that asserts the column types are `text` and that upserting an edge with a non-UUID `target_id` does not error.
|
|
|
|
## Safety
|
|
|
|
- Change is limited to `inventory_links` columns only.
|
|
- Unique constraint and indexes continue to function on `text` columns.
|
|
|
|
## Testing
|
|
|
|
- Pest feature test under `tests/Feature/Inventory/`.
|
|
- Run focused test + existing inventory extraction tests.
|