Skip to content

Commit

Permalink
sqlite: add migration to drop registry columns from v2
Browse files Browse the repository at this point in the history
  • Loading branch information
n8maninger committed Sep 1, 2024
1 parent 3a44e13 commit 45cda98
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions persist/sqlite/migrations.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ import (
"go.uber.org/zap"
)

func migrateVersion30(tx *txn, _ *zap.Logger) error {
_, err := tx.Exec(`
ALTER TABLE contracts_v2 DROP COLUMN registry_read;
ALTER TABLE contracts_v2 DROP COLUMN registry_write;`)
return err
}

// migrateVersion29 resets the chain state to trigger a full rescan of the
// wallet to calculate the new immature balance metric.
func migrateVersion29(tx *txn, _ *zap.Logger) error {
Expand Down Expand Up @@ -915,4 +922,5 @@ var migrations = []func(tx *txn, log *zap.Logger) error{
migrateVersion27,
migrateVersion28,
migrateVersion29,
migrateVersion30,
}

0 comments on commit 45cda98

Please sign in to comment.