From 20f922a84d9e5b831654283d9f331fd0fe28c45d Mon Sep 17 00:00:00 2001
From: Ludovic Pouzenc <ludovic@pouzenc.fr>
Date: Sun, 22 May 2016 12:12:13 +0200
Subject: DB : reorder some colums for some auto-baked index.ctp

---
 schema/schema-mysql.sql | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

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

diff --git a/schema/schema-mysql.sql b/schema/schema-mysql.sql
index aea9c0d..21fc549 100644
--- a/schema/schema-mysql.sql
+++ b/schema/schema-mysql.sql
@@ -177,13 +177,14 @@ DROP TABLE IF EXISTS `equipements`;
 /*!40101 SET character_set_client = utf8 */;
 CREATE TABLE `equipements` (
   `id` int(11) NOT NULL AUTO_INCREMENT,
-  `mac` char(17) COLLATE utf8_unicode_ci NOT NULL,
   `uplink_id` int(11) DEFAULT NULL,
-  `service_id` int(11) DEFAULT NULL,
+  `mac` char(17) COLLATE utf8_unicode_ci NOT NULL,
   `ipmgmt_id` varchar(15) COLLATE utf8_unicode_ci DEFAULT NULL,
+  `hostname` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
   `equipement_modele_id` int(11) NOT NULL,
-  `equipement_mode_id` char(8) COLLATE utf8_unicode_ci NOT NULL,
+  `service_id` int(11) DEFAULT NULL,
   `relais_id` int(11) DEFAULT NULL,
+  `equipement_mode_id` char(8) COLLATE utf8_unicode_ci NOT NULL,
   `description` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
   `date_achat` date DEFAULT NULL,
   `date_hs` date DEFAULT NULL,
@@ -266,12 +267,12 @@ DROP TABLE IF EXISTS `interesses`;
 CREATE TABLE `interesses` (
   `id` int(11) NOT NULL AUTO_INCREMENT,
   `date_demande` date NOT NULL,
-  `interesse_statut_id` int(11) NOT NULL,
   `civilite_id` int(11) NOT NULL,
   `nom` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
   `prenom` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
   `raison` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL,
   `ville_id` int(11) NOT NULL,
+  `interesse_statut_id` int(11) NOT NULL,
   `telephone` varchar(12) COLLATE utf8_unicode_ci DEFAULT NULL,
   `mail` varchar(48) COLLATE utf8_unicode_ci DEFAULT NULL,
   `adresse1` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
@@ -282,9 +283,9 @@ CREATE TABLE `interesses` (
   KEY `civilite_id` (`civilite_id`),
   KEY `ville_id` (`ville_id`),
   KEY `interesse_statut_id` (`interesse_statut_id`),
-  CONSTRAINT `interesses_ibfk_3` FOREIGN KEY (`interesse_statut_id`) REFERENCES `interesse_statuts` (`id`) ON UPDATE CASCADE,
   CONSTRAINT `interesses_ibfk_1` FOREIGN KEY (`civilite_id`) REFERENCES `civilites` (`id`) ON UPDATE CASCADE,
-  CONSTRAINT `interesses_ibfk_2` FOREIGN KEY (`ville_id`) REFERENCES `villes` (`id`) ON UPDATE CASCADE
+  CONSTRAINT `interesses_ibfk_2` FOREIGN KEY (`ville_id`) REFERENCES `villes` (`id`) ON UPDATE CASCADE,
+  CONSTRAINT `interesses_ibfk_3` FOREIGN KEY (`interesse_statut_id`) REFERENCES `interesse_statuts` (`id`) ON UPDATE CASCADE
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
 /*!40101 SET character_set_client = @saved_cs_client */;
 
@@ -790,4 +791,4 @@ CREATE TABLE `villes` (
 /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
 /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
 
--- Dump completed on 2016-04-23 14:09:11
+-- Dump completed on 2016-05-22 12:10:25
-- 
cgit v1.1

