-
Notifications
You must be signed in to change notification settings - Fork 1
Schema migration assistant #3
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or requestpriority: P2Nice-to-haveNice-to-havesize: LLarger effort — multiple days, design decisions neededLarger effort — multiple days, design decisions needed
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestpriority: P2Nice-to-haveNice-to-havesize: LLarger effort — multiple days, design decisions neededLarger effort — multiple days, design decisions needed
Type
Fields
Give feedbackNo fields configured for issues without a type.
Description
Tooling to help migrate config values when schema changes.
Specific scenario: schema version drift
When a tenant's schema version is upgraded via
UpdateTenant, the server invalidates the validator cache (internal/schema/service.go:660-662) but does not re-validate existing config data against the new schema's constraints.If a schema update adds a required field, tightens a constraint (e.g.
min: 0→min: 10), or removes a field, existing values that violate the new rules persist in the database. No error surfaces until someone attempts a new write that triggers validation.This means the system can be in a state where stored config is technically invalid according to the active schema version.
Possible approaches
decree migrate --tenant <id> --dry-runto detect and report driftMigrated from zeevdr/decree#40