Skip to content

Commit

Permalink
bfgd: drop btc_blocks_can refresh triggers for l2_keystones/pop_basis (
Browse files Browse the repository at this point in the history
…#120)

* do not refresh btc_blocks_can on l2_keystones insert/update

prior, we were refreshing a materialized view on each l2_keystones insert/update.  this isn't needed as the materialized view doesn't use that table.  so remove that trigger.

* drop trigger on pop_basis as well
  • Loading branch information
ClaytonNorthey92 authored May 16, 2024
1 parent 2b3c096 commit 6457d16
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion database/bfgd/postgres/postgres.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
)

const (
bfgdVersion = 6
bfgdVersion = 7

logLevel = "INFO"
verbose = false
Expand Down
13 changes: 13 additions & 0 deletions database/bfgd/scripts/0007.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
-- Copyright (c) 2024 Hemi Labs, Inc.
-- Use of this source code is governed by the MIT License,
-- which can be found in the LICENSE file.

BEGIN;

UPDATE version SET version = 7;

DROP TRIGGER btc_blocks_canonical_refresh_l2_keystones ON l2_keystones;

DROP TRIGGER btc_blocks_canonical_refresh_pop_basis ON pop_basis;

COMMIT;

0 comments on commit 6457d16

Please sign in to comment.