feat(metadata-db): add kind column to manifest_files table#1965
Open
feat(metadata-db): add kind column to manifest_files table#1965
Conversation
b9dbe82 to
763e5fe
Compare
LNSD
commented
Mar 12, 2026
| -- Defaults to 'unknown' for existing rows. | ||
| -- ============================================================= | ||
|
|
||
| ALTER TABLE manifest_files ADD COLUMN kind TEXT NOT NULL DEFAULT 'unknown'; |
Contributor
Author
There was a problem hiding this comment.
This is the first of 3 PRs that will require either metadata DB fiddling or redeploying the manifests to upgrade to the latest version
763e5fe to
893795e
Compare
Store dataset kind alongside manifest hash and path so manifests carry their type identity in the database, enabling kind-aware queries and removing runtime kind inference. - Add `kind` TEXT column via migration with 'unknown' default for existing rows - Introduce `ManifestKind` newtype with Cow<str> for zero-copy database operations - Replace `NonEmptyString` with typed `DatasetKind` enum and `ManifestHeader` for dispatch - Convert if-else kind matching to exhaustive match on `DatasetKind` in handlers - Remove `UnsupportedDatasetKind` error variant (now caught at deserialization boundary) Signed-off-by: Lorenzo Delgado <lorenzo@edgeandnode.com>
893795e to
a1dedb8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Store dataset kind alongside manifest hash and path so manifests carry their type identity in the database, enabling kind-aware queries and removing runtime kind inference.
kindTEXT column via migration with 'unknown' default for existing rowsManifestKindnewtype with Cow for zero-copy database operationsNonEmptyStringwith typedDatasetKindenum andManifestHeaderfor dispatchDatasetKindin handlersUnsupportedDatasetKinderror variant (now caught at deserialization boundary)