diff options
author | Nic Eigel <nic@eigel.ch> | 2024-06-24 00:08:47 +0200 |
---|---|---|
committer | Nic Eigel <nic@eigel.ch> | 2024-06-24 00:08:47 +0200 |
commit | 74b23809f3e100ad7d63cd746fd5ff3a93b4fdd5 (patch) | |
tree | 84c79a84255730725c110c61054964f641b8c16d /src/auditordb/0002-auditor_coin_inconsistency.sql | |
parent | ed2d7f089fd071d9983d829a18774616f2a6a147 (diff) | |
download | exchange-74b23809f3e100ad7d63cd746fd5ff3a93b4fdd5.tar.xz |
real-time-auditor
Diffstat (limited to 'src/auditordb/0002-auditor_coin_inconsistency.sql')
-rw-r--r-- | src/auditordb/0002-auditor_coin_inconsistency.sql | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/auditordb/0002-auditor_coin_inconsistency.sql b/src/auditordb/0002-auditor_coin_inconsistency.sql index 91f954a68..2e4b38356 100644 --- a/src/auditordb/0002-auditor_coin_inconsistency.sql +++ b/src/auditordb/0002-auditor_coin_inconsistency.sql @@ -17,12 +17,14 @@ SET search_path TO auditor;
CREATE TABLE IF NOT EXISTS auditor_coin_inconsistency
(
- row_id BIGINT GENERATED BY DEFAULT AS IDENTITY UNIQUE PRIMARY KEY,
- operation BYTEA,
+ row_id BIGINT GENERATED BY DEFAULT AS IDENTITY UNIQUE,
+ operation TEXT NOT NULL,
exchange_amount taler_amount,
auditor_amount taler_amount,
- coin_pub BYTEA,
- profitable BOOLEAN
+ coin_pub BYTEA NOT NULL CHECK (LENGTH(coin_pub)=32),
+ profitable BOOLEAN,
+ suppressed BOOLEAN NOT NULL DEFAULT FALSE,
+ PRIMARY KEY (operation, coin_pub)
);
COMMENT ON TABLE auditor_coin_inconsistency
IS 'Report a (serious) inconsistency in the exchange''s database with respect to calculations involving amounts';
\ No newline at end of file |