diff options
Diffstat (limited to 'src/exchangedb/0002-refresh_revealed_coins.sql')
-rw-r--r-- | src/exchangedb/0002-refresh_revealed_coins.sql | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/exchangedb/0002-refresh_revealed_coins.sql b/src/exchangedb/0002-refresh_revealed_coins.sql index 5fd315ba3..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' @@ -62,9 +62,12 @@ BEGIN ,table_name ,partition_suffix ); - -- - -- FIXME: Add comment for link_sig - -- + 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' @@ -94,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 ( @@ -127,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 || |