From 6d3ad57a5c9b103fac081bb8eabd959a2f7baf1c Mon Sep 17 00:00:00 2001
From: Ludovic Pouzenc <ludovic@pouzenc.fr>
Date: Mon, 29 Aug 2016 20:20:52 +0200
Subject: sql : enforces service < 1 ---- 1 > equipement

---
 schema/schema-mysql.sql | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'schema/schema-mysql.sql')

diff --git a/schema/schema-mysql.sql b/schema/schema-mysql.sql
index 831fbcc..636ebd5 100644
--- a/schema/schema-mysql.sql
+++ b/schema/schema-mysql.sql
@@ -192,10 +192,10 @@ CREATE TABLE `equipements` (
   PRIMARY KEY (`id`),
   UNIQUE KEY `mac` (`mac`),
   UNIQUE KEY `ipmgmt_id` (`ipmgmt_id`),
+  UNIQUE KEY `service_id` (`service_id`),
   KEY `relais_id` (`relais_id`),
   KEY `equipement_mode_id` (`equipement_mode_id`),
   KEY `equipement_modele_id` (`equipement_modele_id`),
-  KEY `service_id` (`service_id`),
   KEY `uplink_id` (`uplink_id`),
   CONSTRAINT `equipements_ibfk_1` FOREIGN KEY (`equipement_modele_id`) REFERENCES `equipement_modeles` (`id`) ON UPDATE CASCADE,
   CONSTRAINT `equipements_ibfk_4` FOREIGN KEY (`service_id`) REFERENCES `services` (`id`),
@@ -860,4 +860,4 @@ DELIMITER ;
 /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
 /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
 
--- Dump completed on 2016-08-28 10:56:15
+-- Dump completed on 2016-08-29 20:20:38
-- 
cgit v1.1

