Documentation
¶
Overview ¶
Package introspect defines schema introspection: discovering entity metadata from a live database, and detecting drift between configured and discovered schemas. The Introspector interface lives here; providers in x/ implement it. DetectDrift is pure logic and runs at startup to fail fast on mismatched configuration (a referenced column that no longer exists in the DB).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Drift ¶
type Drift struct {
// Missing lists configured entities/fields absent from the DB
// (entity name, or "entity.field").
Missing []string
// Extra lists DB columns not present in the config.
Extra []string
// TypeChanged lists fields whose DB type differs from the config.
TypeChanged []string
}
Drift describes differences between configured and discovered schemas.
func DetectDrift ¶
DetectDrift compares configured entities against discovered ones. A missing entity is reported by name; missing/extra fields are reported as "entity.field". It is pure and deterministic.