From: Ant Zucaro Date: Fri, 25 Nov 2016 21:17:49 +0000 (-0500) Subject: Insert a logging record to the merged_server table after the merge is done. X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=d87c5b9096c77b597f837d3b5109c168b2645649;p=xonotic%2Fxonstatdb.git Insert a logging record to the merged_server table after the merge is done. --- diff --git a/functions/merge_servers.sql b/functions/merge_servers.sql index 602c808..551d7cf 100644 --- a/functions/merge_servers.sql +++ b/functions/merge_servers.sql @@ -39,6 +39,8 @@ begin update servers set active_ind = false where server_id = p_loser_server_id; raise notice 'Server #% deactivated.', p_loser_server_id; + + insert into merged_servers(winning_server_id, losing_server_id) values(p_winner_server_id, p_loser_server_id); end; $$ language plpgsql;