Migration 000139 Recovery — Dirty version 138
If your Vetrix instance fails to start with an error like:
Dirty database version 138. Fix and force version.
This means migration 000138 (added in v0.8.84) failed mid-execution and left the database in a dirty state. Migration 000139 will fix the index, but first you must clear the dirty flag manually.
Steps
- Connect to your PostgreSQL database.
- Clear the dirty flag:
UPDATE schema_migrations SET dirty = false WHERE version = 138; - Restart the Vetrix server. The migration runner will:
- Skip version 138 (already recorded as applied, even if partially)
- Apply version 000139, which drops the index (if it exists) and recreates
it correctly using
convert_from(content, 'UTF8').
Cause
Migration 000138 built a GIN trigram index on registry_manifests.content
using content::text, which hex-encodes BYTEA rather than decoding UTF-8.
This is corrected in v0.8.88, but environments that applied the broken version
may have a dirty state or a wrong index.