diff options
author | Christian Grothoff <christian@grothoff.org> | 2020-02-03 23:42:47 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2020-02-03 23:42:47 +0100 |
commit | 232606fb57e3c74b62aa78d49225e2bb3c0c9ab4 (patch) | |
tree | ef4d74eb32bd577868fa77f625d4b2685086ff9f /src/auditordb | |
parent | f4f86d2b0149231e95b81f12a607c670ad74f02f (diff) | |
download | exchange-232606fb57e3c74b62aa78d49225e2bb3c0c9ab4.tar.gz exchange-232606fb57e3c74b62aa78d49225e2bb3c0c9ab4.tar.bz2 exchange-232606fb57e3c74b62aa78d49225e2bb3c0c9ab4.zip |
add IF NOT EXISTS for indices
Diffstat (limited to 'src/auditordb')
-rw-r--r-- | src/auditordb/0001.sql | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/auditordb/0001.sql b/src/auditordb/0001.sql index 7f47f035..3e666519 100644 --- a/src/auditordb/0001.sql +++ b/src/auditordb/0001.sql @@ -115,7 +115,7 @@ CREATE TABLE IF NOT EXISTS auditor_reserves ,auditor_reserves_rowid BIGSERIAL UNIQUE ,origin_account TEXT ); -CREATE INDEX auditor_reserves_by_reserve_pub +CREATE INDEX IF NOT EXISTS auditor_reserves_by_reserve_pub ON auditor_reserves (reserve_pub); -- Table with the sum of the balances of all customer reserves @@ -203,7 +203,7 @@ CREATE TABLE IF NOT EXISTS auditor_historic_reserve_summary ,reserve_profits_val INT8 NOT NULL ,reserve_profits_frac INT4 NOT NULL ); -CREATE INDEX auditor_historic_reserve_summary_by_master_pub_start_date +CREATE INDEX IF NOT EXISTS auditor_historic_reserve_summary_by_master_pub_start_date ON auditor_historic_reserve_summary (master_pub ,start_date); |