From dc1c7e6ecaeb3e27d9f89d2d97df32152037fa27 Mon Sep 17 00:00:00 2001
From: Kirill Solomko <ksolomko@sipwise.com>
Date: Mon, 22 Dec 2014 15:08:44 +0100
Subject: [PATCH] MT#10169 - add voip_rewrute_rules.enabled columns creation
 into 15129.up/down

---
 db_scripts/diff/15129.down | 4 ++++
 db_scripts/diff/15129.up   | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/db_scripts/diff/15129.down b/db_scripts/diff/15129.down
index c2881949..8a1300a2 100644
--- a/db_scripts/diff/15129.down
+++ b/db_scripts/diff/15129.down
@@ -63,3 +63,7 @@ DELIMITER ;;
 
   END */;;
 DELIMITER ;
+
+ALTER TABLE voip_peer_hosts DROP column `enabled`;
+ALTER TABLE voip_peer_rules DROP column `enabled`;
+ALTER TABLE voip_rewrite_rules DROP column `enabled`;
diff --git a/db_scripts/diff/15129.up b/db_scripts/diff/15129.up
index fa58f586..ee19ffaf 100644
--- a/db_scripts/diff/15129.up
+++ b/db_scripts/diff/15129.up
@@ -1,5 +1,9 @@
 USE provisioning;
 
+ALTER TABLE voip_peer_hosts ADD column `enabled` tinyint(1) NOT NULL DEFAULT '1' AFTER via_lb;
+ALTER TABLE voip_peer_rules ADD column `enabled` tinyint(1) NOT NULL DEFAULT '1' AFTER description;
+ALTER TABLE voip_rewrite_rules ADD column `enabled` tinyint(1) NOT NULL DEFAULT '1' AFTER priority;
+
 DROP TRIGGER IF EXISTS voip_rwrules_crepl_trig;
 DELIMITER ;;
 /*!50003 CREATE*/ /*!50017 DEFINER=`sipwise`@`localhost`*/ /*!50003 TRIGGER voip_rwrules_crepl_trig AFTER INSERT ON voip_rewrite_rules