aboutsummaryrefslogtreecommitdiff
path: root/src/exchangedb/0002-reserves.sql
diff options
context:
space:
mode:
Diffstat (limited to 'src/exchangedb/0002-reserves.sql')
-rw-r--r--src/exchangedb/0002-reserves.sql5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/exchangedb/0002-reserves.sql b/src/exchangedb/0002-reserves.sql
index e5db97fe5..03d17aee2 100644
--- a/src/exchangedb/0002-reserves.sql
+++ b/src/exchangedb/0002-reserves.sql
@@ -95,6 +95,11 @@ DECLARE
BEGIN
table_name = concat_ws('_', table_name, partition_suffix);
EXECUTE FORMAT (
+ 'ALTER TABLE ' || table_name ||
+ ' ADD CONSTRAINT ' || table_name || '_unique_uuid'
+ ' UNIQUE (reserve_uuid)'
+ );
+ EXECUTE FORMAT (
'CREATE INDEX ' || table_name || '_by_expiration_index '
'ON ' || table_name || ' '
'(expiration_date'