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_amount_arithmetic_inconsistency.sql | |
parent | ed2d7f089fd071d9983d829a18774616f2a6a147 (diff) | |
download | exchange-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.sql | 11 |
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';
|