Repository navigation
v0.3.0: renamed to PgVouch, Apache 2.0
Changed
Renamed from DriftGuard to PgVouch (the npm name driftguard belongs to an unrelated project). Breaking for existing setups: the CLI is now pgvouch, environment variables are PGVOUCH_* (was DRIFTGUARD_*), the demo read-only role is pgvouch_ro, the MCP server name is pgvouch, and the Docker image is ghcr.io//pgvouch. Recreate the demo databases with npm run db:down && npm run db:up.
License changed from MIT to Apache 2.0, which adds an explicit patent grant from contributors. A NOTICE file ships with the npm package and the Docker image.
Fixed
Type-change rewrite kept indexes and constraints on the old column. After the expand/contract swap, a foreign key, CHECK, UNIQUE constraint or index on the column stayed on _old, so the rules plan failed its own shadow run (e.g. transactions_merchant_id_fkey ended up on merchant_id_old). They are now copied to the new column without blocking (index CONCURRENTLY, FK/CHECK NOT VALID + VALIDATE, UNIQUE via a concurrent index + USING INDEX) and take their original names in the swap. A primary key, exclusion constraints and foreign keys from other tables stay a named manual step. Two new eval scenarios cover it (23 in total, 19/19 rules plans pass the shadow run).
The column swap is atomic. The two renames now run inside one BEGIN ... COMMIT, so there is no moment where the column name doesn't exist.
The plan validator accepted any DROP. DROP SCHEMA ... CASCADE, DROP VIEW, DROP FUNCTION etc. passed and were rendered as normal steps. Only DROP INDEX and DROP TABLE are allowed now.
Typos gave misleading answers. An unknown schema (diff --schema typo) reported "No schema drift"; an unknown table (verify --table typo, MCP find_differing_rows) reported "DIFFERENCES FOUND". Both are now errors. --chunk-size and --max-rows reject invalid numbers up front, and receipt-verify says clearly when a file isn't a receipt.