aboutsummaryrefslogtreecommitdiff
path: root/src/auditordb/0002-auditor_amount_arithmetic_inconsistency.sql
diff options
context:
space:
mode:
authorNic Eigel <nic@eigel.ch>2024-06-24 00:08:47 +0200
committerNic Eigel <nic@eigel.ch>2024-06-24 00:08:47 +0200
commit74b23809f3e100ad7d63cd746fd5ff3a93b4fdd5 (patch)
tree84c79a84255730725c110c61054964f641b8c16d /src/auditordb/0002-auditor_amount_arithmetic_inconsistency.sql
parented2d7f089fd071d9983d829a18774616f2a6a147 (diff)
downloadexchange-74b23809f3e100ad7d63cd746fd5ff3a93b4fdd5.tar.xz
real-time-auditor
Diffstat (limited to 'src/auditordb/0002-auditor_amount_arithmetic_inconsistency.sql')
-rw-r--r--src/auditordb/0002-auditor_amount_arithmetic_inconsistency.sql11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/auditordb/0002-auditor_amount_arithmetic_inconsistency.sql b/src/auditordb/0002-auditor_amount_arithmetic_inconsistency.sql
index 19dfa682c..007f69ea1 100644
--- a/src/auditordb/0002-auditor_amount_arithmetic_inconsistency.sql
+++ b/src/auditordb/0002-auditor_amount_arithmetic_inconsistency.sql
@@ -14,13 +14,18 @@
-- TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
--
+-- TODO: The constraints of operation are just for testing
+
CREATE TABLE auditor_amount_arithmetic_inconsistency
(
- row_id BIGINT GENERATED BY DEFAULT AS IDENTITY UNIQUE PRIMARY KEY,
- operation BYTEA,
+ row_id BIGINT GENERATED BY DEFAULT AS IDENTITY UNIQUE,
+ -- TODO: correct constraintcheck, currently wrong
+ --operation BYTEA NOT NULL CHECK (LENGTH(operation)=16),
+ operation TEXT NOT NULL PRIMARY KEY,
exchange_amount taler_amount,
auditor_amount taler_amount,
- profitable BOOLEAN
+ profitable BOOLEAN,
+ suppressed BOOLEAN NOT NULL DEFAULT FALSE
);
COMMENT ON TABLE auditor_amount_arithmetic_inconsistency
IS 'Report a (serious) inconsistency in the exchange''s database with respect to calculations involving amounts';