aboutsummaryrefslogtreecommitdiff
path: root/src/auditordb/auditor-0002.sql.in
diff options
context:
space:
mode:
Diffstat (limited to 'src/auditordb/auditor-0002.sql.in')
-rw-r--r--src/auditordb/auditor-0002.sql.in19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/auditordb/auditor-0002.sql.in b/src/auditordb/auditor-0002.sql.in
index ab0db2fb8..3d07433ea 100644
--- a/src/auditordb/auditor-0002.sql.in
+++ b/src/auditordb/auditor-0002.sql.in
@@ -24,13 +24,18 @@ COMMENT ON SCHEMA auditor IS 'taler-auditor data';
SELECT _v.register_patch('auditor-0002', NULL, NULL);
SET search_path TO auditor;
-CREATE TYPE taler_amount
- AS
- (val INT8
- ,frac INT4
- );
-COMMENT ON TYPE taler_amount
- IS 'Stores an amount, fraction is in units of 1/100000000 of the base value';
+DO $$ BEGIN
+ CREATE TYPE taler_amount
+ AS
+ (val INT8
+ ,frac INT4
+ );
+ COMMENT ON TYPE taler_amount
+ IS 'Stores an amount, fraction is in units of 1/100000000 of the base value';
+EXCEPTION
+ WHEN duplicate_object THEN null;
+END $$;
+
#include "0002-auditor_balances.sql"
#include "0002-auditor_denomination_pending.sql"