]> git.rm.cloudns.org Git - xonotic/xonstatdb.git/commitdiff
Insert a logging record to the merged_server table after the merge is done.
authorAnt Zucaro <azucaro@gmail.com>
Fri, 25 Nov 2016 21:17:49 +0000 (16:17 -0500)
committerAnt Zucaro <azucaro@gmail.com>
Fri, 25 Nov 2016 21:17:49 +0000 (16:17 -0500)
functions/merge_servers.sql

index 602c8086fd63dc0a1c7be9ab62e66c82b01afbb2..551d7cfed9d5dff136b3cba5a38a5e9b2fab0320 100644 (file)
@@ -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;