From b2c7b3f2d325d8ad52eaa35c558c00088618381b Mon Sep 17 00:00:00 2001 From: Ludovic Pouzenc Date: Sat, 12 Mar 2016 14:59:41 +0100 Subject: database : dump also enum tables data --- schema/dump-it.sh | 17 ++- schema/enum-tables-data-mysql.sql | 251 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 267 insertions(+), 1 deletion(-) create mode 100644 schema/enum-tables-data-mysql.sql (limited to 'schema') diff --git a/schema/dump-it.sh b/schema/dump-it.sh index 6e9ea5c..1e2276f 100755 --- a/schema/dump-it.sh +++ b/schema/dump-it.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash -x # Copyright 2016 Ludovic Pouzenc # Copyright 2016 Nicolas Goaziou # @@ -17,5 +17,20 @@ # You should have received a copy of the GNU General Public License # along with CHD Gestion. If not, see . # +enum_tables=" +adherent_role_types +adherent_statuts +adherent_types +civilites +equipement_modeles +equipement_modes +periodicites +service_statuts +service_types +" +mysqldump --defaults-file=/etc/mysql/debian.cnf gestion \ + $enum_tables > enum-tables-data-mysql.sql + mysqldump --defaults-file=/etc/mysql/debian.cnf --no-data gestion \ | sed -e 's/AUTO_INCREMENT=[0-9]\+ //g' > schema-mysql.sql + diff --git a/schema/enum-tables-data-mysql.sql b/schema/enum-tables-data-mysql.sql new file mode 100644 index 0000000..375f511 --- /dev/null +++ b/schema/enum-tables-data-mysql.sql @@ -0,0 +1,251 @@ +-- MySQL dump 10.13 Distrib 5.5.47, for debian-linux-gnu (x86_64) +-- +-- Host: localhost Database: gestion +-- ------------------------------------------------------ +-- Server version 5.5.47-0+deb8u1 + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +-- +-- Table structure for table `adherent_role_types` +-- + +DROP TABLE IF EXISTS `adherent_role_types`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `adherent_role_types` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` varchar(32) COLLATE utf8_unicode_ci NOT NULL, + `list_name` varchar(32) COLLATE utf8_unicode_ci NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `adherent_role_types` +-- + +LOCK TABLES `adherent_role_types` WRITE; +/*!40000 ALTER TABLE `adherent_role_types` DISABLE KEYS */; +INSERT INTO `adherent_role_types` VALUES (1,'Président','president'),(2,'Trésorier','tresorier'),(3,'Trésorier adjoint','tresorier'),(4,'Secrétaire','secretaire'),(5,'Secrétaire Adjoint','secretaire'),(6,'Développement','developpement'),(7,'Référent','referents'); +/*!40000 ALTER TABLE `adherent_role_types` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `adherent_statuts` +-- + +DROP TABLE IF EXISTS `adherent_statuts`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `adherent_statuts` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` varchar(32) COLLATE utf8_unicode_ci NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `title` (`title`) +) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `adherent_statuts` +-- + +LOCK TABLES `adherent_statuts` WRITE; +/*!40000 ALTER TABLE `adherent_statuts` DISABLE KEYS */; +INSERT INTO `adherent_statuts` VALUES (2,'☐ Fiche ☐ Prélev'),(4,'☐ Fiche ☑ Prélev'),(3,'☑ Fiche ☐ Prélev'),(5,'☑ Fiche ☑ Prélev'),(7,'A relancer'),(8,'Bénévole sans service'),(6,'Incohérent'),(1,'Résilié'); +/*!40000 ALTER TABLE `adherent_statuts` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `adherent_types` +-- + +DROP TABLE IF EXISTS `adherent_types`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `adherent_types` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` varchar(32) COLLATE utf8_unicode_ci NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `adherent_types` +-- + +LOCK TABLES `adherent_types` WRITE; +/*!40000 ALTER TABLE `adherent_types` DISABLE KEYS */; +INSERT INTO `adherent_types` VALUES (1,'Perso'),(2,'Pro'),(3,'Public'),(4,'Asso'); +/*!40000 ALTER TABLE `adherent_types` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `civilites` +-- + +DROP TABLE IF EXISTS `civilites`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `civilites` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` varchar(32) COLLATE utf8_unicode_ci NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `civilites` +-- + +LOCK TABLES `civilites` WRITE; +/*!40000 ALTER TABLE `civilites` DISABLE KEYS */; +INSERT INTO `civilites` VALUES (1,'M.'),(2,'Mme'),(3,'Melle'); +/*!40000 ALTER TABLE `civilites` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `equipement_modeles` +-- + +DROP TABLE IF EXISTS `equipement_modeles`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `equipement_modeles` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `constructeur` varchar(32) COLLATE utf8_unicode_ci NOT NULL, + `modele` varchar(32) COLLATE utf8_unicode_ci NOT NULL, + `profile` varchar(16) COLLATE utf8_unicode_ci NOT NULL, + `revision` varchar(8) COLLATE utf8_unicode_ci NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=42 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Modèles d''équipements'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `equipement_modeles` +-- + +LOCK TABLES `equipement_modeles` WRITE; +/*!40000 ALTER TABLE `equipement_modeles` DISABLE KEYS */; +INSERT INTO `equipement_modeles` VALUES (1,'Mikrotik','RouterBoard 750UP','',''),(2,'TP-Link','TL-WR740ND v??','TLWR740','4'),(3,'TP-Link','TL-WR740ND v1-3','',''),(4,'TP-Link','TL-WR740ND v4','TLWR740','4'),(5,'TP-Link','TL-WR740ND v5','',''),(6,'TP-Link','TL-WR841ND v9','TLWR841','9'),(7,'TP-Link','TL-WR841ND v10','','10'),(8,'TP-Link','TL-WR841ND v11','','11'),(10,'Ubiquiti','AirFiber 5X + AF-5G30-S45','',''),(11,'Ubiquiti','AirFiber 5X + Mars 25dBi','',''),(12,'Ubiquiti','NanoBeam M5 16','',''),(13,'Ubiquiti','NanoBeam M5 19','',''),(14,'Ubiquiti','NanoBridge M5 G22','',''),(15,'Ubiquiti','NanoBridge M5 G25','',''),(16,'Ubiquiti','Nanostation M5','',''),(17,'Ubiquiti','Nanostation M5 Loco','',''),(18,'Ubiquiti','PowerBeam M5 400','',''),(19,'Ubiquiti','Rocket M5','',''),(20,'Ubiquiti','ToughSwitch TS5','',''),(21,'Ubiquiti','ToughSwitch TS8','',''),(40,'Netonix','WS-6-MINI','',''),(41,'Mikrotik','RB2011UiAS-2HnD-IN',' ',' '); +/*!40000 ALTER TABLE `equipement_modeles` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `equipement_modes` +-- + +DROP TABLE IF EXISTS `equipement_modes`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `equipement_modes` ( + `id` char(8) COLLATE utf8_unicode_ci NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `equipement_modes` +-- + +LOCK TABLES `equipement_modes` WRITE; +/*!40000 ALTER TABLE `equipement_modes` DISABLE KEYS */; +INSERT INTO `equipement_modes` VALUES ('br-ap'),('br-sta'),('rt-main'),('rt-soho'),('rt-sta'),('switch'); +/*!40000 ALTER TABLE `equipement_modes` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `periodicites` +-- + +DROP TABLE IF EXISTS `periodicites`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `periodicites` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` varchar(32) COLLATE utf8_unicode_ci NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `periodicites` +-- + +LOCK TABLES `periodicites` WRITE; +/*!40000 ALTER TABLE `periodicites` DISABLE KEYS */; +INSERT INTO `periodicites` VALUES (1,'Mensuel'),(2,'Trimestriel'),(3,'Annuel'); +/*!40000 ALTER TABLE `periodicites` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `service_statuts` +-- + +DROP TABLE IF EXISTS `service_statuts`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `service_statuts` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` varchar(32) COLLATE utf8_unicode_ci NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `service_statuts` +-- + +LOCK TABLES `service_statuts` WRITE; +/*!40000 ALTER TABLE `service_statuts` DISABLE KEYS */; +INSERT INTO `service_statuts` VALUES (-1,'Inconnu'),(1,'Prévu'),(2,'Actif TTN'),(3,'Migré'),(4,'Actif CHD'),(5,'Suspendu'),(6,'Résilié'); +/*!40000 ALTER TABLE `service_statuts` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `service_types` +-- + +DROP TABLE IF EXISTS `service_types`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `service_types` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` varchar(32) COLLATE utf8_unicode_ci NOT NULL, + `prix_base_ht` decimal(7,2) NOT NULL, + `periodicite_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `periodicite_id` (`periodicite_id`), + CONSTRAINT `service_types_ibfk_1` FOREIGN KEY (`periodicite_id`) REFERENCES `periodicites` (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Services disponibles'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `service_types` +-- + +LOCK TABLES `service_types` WRITE; +/*!40000 ALTER TABLE `service_types` DISABLE KEYS */; +INSERT INTO `service_types` VALUES (1,'Adhésion',20.00,3),(2,'Internet + matériel',28.00,1),(3,'Internet',25.00,1),(4,'Internet + relais',20.00,1); +/*!40000 ALTER TABLE `service_types` ENABLE KEYS */; +UNLOCK TABLES; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +-- Dump completed on 2016-03-12 14:58:03 -- cgit v1.1