• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

lightninglabs / taproot-assets / 13426103383

20 Feb 2025 01:45AM UTC coverage: 54.392% (-0.02%) from 54.41%
13426103383

Pull #1386

github

Roasbeef
tapdb: expand allowed proof types in universe-related tables

This commit introduces a migration that expands the allowed values for
the "proof_type" column in the universe-related tables by adding new
proof types: "burn" and "ignore".

Key changes include:
- Creation of a new table `proof_types` to store valid proof type
  values. Before this commit, we used a `CHECK` statement. With the way
  sqlite works, we can't _alter_ the `CHECK` statement, and just
  dropping the row would lose data.

  So instead, we add a new enum-like table instead. This can be updated
  in future migrations to add new proof types. We then do a migration to
  update all tables to use this instead.

- Updates to the `universe_roots`, `federation_global_sync_config`, and
  `federation_uni_sync_config` tables to accommodate the new proof
  types. This involves adding a new column `proof_type_ext` that
  references the `proof_types` table, copying existing data, and
  renaming columns to maintain the original structure.

- A new test case `TestMigration29` has been added to ensure the
  migration works as expected, verifying both the migration of existing
  data and the insertion of new rows with the new proof types.

- The `.gitignore` file has been updated to exclude files matching the
  pattern `.aider*`.

Additionally, a down migration script has been created to revert these
changes if necessary. This ensures that the database schema can be
rolled back to its previous state without data loss.
Pull Request #1386: tapdb: expand allowed proof types in universe-related tables

11 of 12 new or added lines in 5 files covered. (91.67%)

47 existing lines in 12 files now uncovered.

48595 of 89342 relevant lines covered (54.39%)

0.8 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

52.98
/tapdb/sqlc/mssmt.sql.go


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc