Tags: vultisig/verifier
Tags
feat: rebuild plugin_id PKs and FKs in verifier migration (#549) The system migration dynamically drops all constraints on plugin_id columns during the enum-to-text conversion but only rebuilds the unique_fees_policy_per_public_key index on plugin_policies (the only table guaranteed to exist in system migrations). This verifier migration rebuilds all 6 primary keys and 10 foreign keys on verifier-specific tables. It is idempotent: on fresh installs the constraints already exist from CREATE TABLE, so each is skipped. Co-authored-by: Claude (claude-opus-4-6) <noreply@anthropic.com>
feat: convert plugin_id from PostgreSQL ENUM to TEXT (#547) * feat: convert plugin_id from PostgreSQL ENUM to TEXT Add a dynamic PL/pgSQL system migration that: - Discovers all columns/constraints using the plugin_id enum via pg_catalog - Drops FK/PK constraints, converts columns to TEXT, rebuilds constraints - Drops the enum type and creates a DOMAIN "plugin_id" AS TEXT for forward-compatibility with older migrations on fresh installs - Works for both system-only consumers and full verifier installs Also updates SQLC schema, regenerated code, and Go source to remove all queries.PluginID() casts and ::plugin_id SQL casts. Co-Authored-By: Claude (claude-opus-4-6) <noreply@anthropic.com> * fix: filter pg_catalog queries to tables only (relkind='r') The dynamic migration was picking up index relations from pg_class when querying pg_attribute, causing ALTER TABLE to fail on indexes like idx_plugin_policies_plugin_id. Add c.relkind = 'r' filter to all pg_catalog queries to restrict to ordinary tables. Co-Authored-By: Claude (claude-opus-4-6) <noreply@anthropic.com> * Update schema * fix: relax smoke test plugin assertions for text-based ordering With plugin_id as TEXT instead of ENUM, plugins are returned in alphabetical order. The first plugin may not have pricing and may have a multi-segment ID. Remove the ordering-dependent regex and pricing assertions from the list endpoint (specific plugin tests still validate these fields). Co-Authored-By: Claude (claude-opus-4-6) <noreply@anthropic.com> * fix: add sqlc override to map plugin_id domain to string After the enum-to-domain conversion, pg_dump outputs column types as the domain name 'plugin_id' instead of 'text'. SQLC doesn't know how to map custom domains, defaulting to interface{}. Add explicit type overrides so plugin_id maps to string (and pgtype.Text for nullable). Co-Authored-By: Claude (claude-opus-4-6) <noreply@anthropic.com> --------- Co-authored-by: Claude (claude-opus-4-6) <noreply@anthropic.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
refactor: remove ::plugin_id casts from earnings queries (#546) Cast the enum PK to text instead of casting varchar to enum, making these queries compatible with both the current enum type and a future text type for plugin_id. Co-authored-by: Claude (claude-opus-4-6) <noreply@anthropic.com>
PreviousNext