From 014606c4a563d4b8bf20713e858948ce1d2f8bff Mon Sep 17 00:00:00 2001 From: ClaytonNorthey92 Date: Fri, 3 Jan 2025 18:12:21 -0500 Subject: [PATCH] added sql file --- database/bfgd/scripts/0012.sql | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 database/bfgd/scripts/0012.sql diff --git a/database/bfgd/scripts/0012.sql b/database/bfgd/scripts/0012.sql new file mode 100644 index 00000000..48613b10 --- /dev/null +++ b/database/bfgd/scripts/0012.sql @@ -0,0 +1,19 @@ + +-- Copyright (c) 2025 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 = 12; + +CREATE TABLE l2_keystones_lowest_btc_block ( + l2_keystone_abrev_hash BYTEA NOT NULL PRIMARY KEY, + btc_block_hash BYTEA NULL, + btc_block_height BIGINT NULL +); + +CREATE TRIGGER pop_basis_upsert AFTER INSERT OR DELETE OR UPDATE + ON pop_basis FOR EACH ROW EXECUTE PROCEDURE notify_event(); + +COMMIT; \ No newline at end of file