summaryrefslogtreecommitdiff
path: root/src/exchangedb/0002-refresh_revealed_coins.sql
diff options
context:
space:
mode:
Diffstat (limited to 'src/exchangedb/0002-refresh_revealed_coins.sql')
-rw-r--r--src/exchangedb/0002-refresh_revealed_coins.sql16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/exchangedb/0002-refresh_revealed_coins.sql b/src/exchangedb/0002-refresh_revealed_coins.sql
index 912e4bbbd..ad65c9942 100644
--- a/src/exchangedb/0002-refresh_revealed_coins.sql
+++ b/src/exchangedb/0002-refresh_revealed_coins.sql
@@ -15,13 +15,13 @@
--
CREATE FUNCTION create_table_refresh_revealed_coins(
- IN partition_suffix VARCHAR DEFAULT NULL
+ IN partition_suffix TEXT DEFAULT NULL
)
RETURNS VOID
LANGUAGE plpgsql
AS $$
DECLARE
- table_name VARCHAR DEFAULT 'refresh_revealed_coins';
+ table_name TEXT DEFAULT 'refresh_revealed_coins';
BEGIN
PERFORM create_partitioned_table(
'CREATE TABLE %I'
@@ -63,6 +63,12 @@ BEGIN
,partition_suffix
);
PERFORM comment_partitioned_column(
+ 'Signature of type WALLET_COIN_LINK, proves exchange did not tamper with the link data'
+ ,'link_sig'
+ ,table_name
+ ,partition_suffix
+ );
+ PERFORM comment_partitioned_column(
'envelope of the new coin to be signed'
,'coin_ev'
,table_name
@@ -91,13 +97,13 @@ $$;
CREATE FUNCTION constrain_table_refresh_revealed_coins(
- IN partition_suffix VARCHAR
+ IN partition_suffix TEXT
)
RETURNS void
LANGUAGE plpgsql
AS $$
DECLARE
- table_name VARCHAR DEFAULT 'refresh_revealed_coins';
+ table_name TEXT DEFAULT 'refresh_revealed_coins';
BEGIN
table_name = concat_ws('_', table_name, partition_suffix);
EXECUTE FORMAT (
@@ -124,7 +130,7 @@ RETURNS void
LANGUAGE plpgsql
AS $$
DECLARE
- table_name VARCHAR DEFAULT 'refresh_revealed_coins';
+ table_name TEXT DEFAULT 'refresh_revealed_coins';
BEGIN
EXECUTE FORMAT (
'ALTER TABLE ' || table_name ||