From 39081f84a402aebb52d98a43e4675c90135cea9b Mon Sep 17 00:00:00 2001
From: Alexander Sulfrian <alexander@sulfrian.net>
Date: Wed, 7 Dec 2011 19:06:52 +0100
Subject: added sql files

---
 sql/perm_delete_by_serverid.sql | 13 +++++++++++++
 1 file changed, 13 insertions(+)
 create mode 100644 sql/perm_delete_by_serverid.sql

(limited to 'sql/perm_delete_by_serverid.sql')

diff --git a/sql/perm_delete_by_serverid.sql b/sql/perm_delete_by_serverid.sql
new file mode 100644
index 0000000..49ffaed
--- /dev/null
+++ b/sql/perm_delete_by_serverid.sql
@@ -0,0 +1,13 @@
+delete from perm_channel where server_id = :server_id:;
+delete from perm_channel_clients where server_id = :server_id:;
+delete from perm_channel_groups where server_id = :server_id:;
+delete from perm_client where server_id = :server_id:;
+delete from perm_server_group where server_id = :server_id:;
+delete from group_channel_to_client where server_id = :server_id:;
+delete from group_server_to_client where server_id = :server_id:;
+delete from groups_channel where server_id = :server_id:;
+delete from groups_server where server_id = :server_id:;
+delete from tokens where server_id = :server_id:;
+update client_properties set value = 0 where ident= "client_icon_id" and server_id= :server_id:;
+update channel_properties set value = 0 where ident= "channel_icon_id" and server_id= :server_id:;
+update server_properties set value = 0 where ident= "virtualserver_icon_id" and server_id= :server_id:;
\ No newline at end of file
-- 
cgit v1.2.3

