From 3ed59022cb9345f61e9b24986ea74576a05d3364 Mon Sep 17 00:00:00 2001 From: aubrey Date: Wed, 24 Jul 2024 18:12:12 -0700 Subject: [PATCH] pindexer: repair SQL syntax for create type/create domain --- crates/bin/pindexer/src/dex/dex.sql | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/crates/bin/pindexer/src/dex/dex.sql b/crates/bin/pindexer/src/dex/dex.sql index 72ff858a6e..e23d37e532 100644 --- a/crates/bin/pindexer/src/dex/dex.sql +++ b/crates/bin/pindexer/src/dex/dex.sql @@ -9,13 +9,17 @@ -- that given an `penumbra_asset::asset::Id`, we always know exactly how to filter -- tables, rather than needing to do a join with another table. -CREATE DOMAIN IF NOT EXISTS Amount AS NUMERIC(39, 0) NOT NULL; +DROP TYPE IF EXISTS Value CASCADE; +DROP DOMAIN IF EXISTS Amount; + +CREATE DOMAIN Amount AS NUMERIC(39, 0) NOT NULL; CREATE TYPE Value AS ( amount Amount, - asset BYTEA NOT NULL + asset BYTEA ); + -- Keeps track of changes to the dex's value circuit breaker. CREATE TABLE IF NOT EXISTS dex_value_circuit_breaker_change ( -- The asset being moved into or out of the dex.