From 9cfb499715f27d372dcbd5655c39f78648bfbfb8 Mon Sep 17 00:00:00 2001 From: Alexandre Cases Date: Mon, 13 Jun 2016 16:20:32 +0200 Subject: [PATCH] Version: 2.4.3.10 --- README-LABINVENT.md | 13 +++++++++++-- database/labinvent_2.1_12-05-16.sql | 12 +++++++++++- database/update/.gitignore | 1 + database/update/db-update-2016-06-13.sql | 14 ++++++++++++++ database/update/update_Donnees_IAS_Labinvent2.sql | 17 +++++++++++++++++ database/update/update_Donnees_IRAP_Labinvent2.sql | 17 +++++++++++++++++ src/Model/Entity/Configuration.php | 1 + src/Model/Entity/GroupesThematique.php | 1 + src/Model/Entity/Materiel.php | 3 +++ src/Model/Entity/Suivi.php | 1 + src/Model/Entity/User.php | 2 ++ src/Model/Table/ConfigurationsTable.php | 4 ++++ src/Model/Table/GroupesThematiquesTable.php | 4 ++++ src/Model/Table/MaterielsTable.php | 10 ++++++++++ src/Model/Table/SuivisTable.php | 3 +++ src/Model/Table/UsersTable.php | 4 ++++ src/Template/Emprunts/add.ctp | 1 + src/Template/Emprunts/edit.ctp | 1 + src/Template/Layout/default.ctp | 2 +- src/Template/Materiels/add.ctp | 2 +- src/Template/Materiels/edit.ctp | 2 +- tests/Fixture/ConfigurationsFixture.php | 4 +++- tests/Fixture/MaterielsFixture.php | 5 ++++- tests/Fixture/SuivisFixture.php | 1 + tests/Fixture/UsersFixture.php | 17 ++++++++++++----- 25 files changed, 129 insertions(+), 13 deletions(-) create mode 100644 database/update/db-update-2016-06-13.sql diff --git a/README-LABINVENT.md b/README-LABINVENT.md index c1cc7c2..dda0782 100755 --- a/README-LABINVENT.md +++ b/README-LABINVENT.md @@ -51,9 +51,16 @@ Logiciel testé et validé sur les configurations suivantes : VERSION ACTUELLE Date: 13/06/2016 -Version: 2.4.3.9 +Version: 2.4.3.10 + +!!! Modification BD !!! + +Ajout de tous les attributs faisant partie des demandes de la version 2.04 dans la base de données ++ Ajout de ces attributs dans les modèles et les fixtures. + + +Demande (terminé) : https://projects.irap.omp.eu/issues/3799 -Bugfixes getEmailFromLDAP & getLoginFromLDAP Version majeure en cours (2.5): https://projects.irap.omp.eu/versions/99 @@ -89,6 +96,8 @@ Liste complète des évolutions: https://gitlab.irap.omp.eu/epallier/labinvent/c MODIFICATIONS STRUCTURELLES A FAIRE MANUELLEMENT APRES LA MISE A JOUR (git pull) +13/06/16 (v2.4.3.10) Adapter la BD en exécutant le script sql database/update/db-update-2016-06-13.sql + 08/06/16 (v2.4.3.2) Adapter la BD en exécutant le script sql database/update/db-update-2016-06-07.sql 07/06/16 (v2.4.3.0) Adapter la BD en exécutant le script sql database/update/db-update-2016-06-06.sql diff --git a/database/labinvent_2.1_12-05-16.sql b/database/labinvent_2.1_12-05-16.sql index 54a91a5..530c5ba 100755 --- a/database/labinvent_2.1_12-05-16.sql +++ b/database/labinvent_2.1_12-05-16.sql @@ -177,6 +177,9 @@ CREATE TABLE IF NOT EXISTS `materiels` ( `date_reception` date DEFAULT NULL, `organisme_id` int(11) DEFAULT NULL, `site_id` int(11) DEFAULT '2', + `date_fin_garantie` date DEFAULT NULL, + `duree_garantie` int(10) DEFAULT NULL, + `unite_duree_garantie` varchar (30) DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `numero_irap` (`numero_laboratoire`), KEY `fk_administrative_materials_sub_categories1` (`sous_categorie_id`), @@ -246,6 +249,7 @@ CREATE TABLE IF NOT EXISTS `suivis` ( `frequence` int(11) DEFAULT NULL, `type_frequence` varchar(30) DEFAULT NULL, `commentaire` varchar(100) DEFAULT NULL, + `panne_resolu` tinyint(1) DEFAULT 1, `nom_createur` varchar(45) DEFAULT NULL COMMENT 'nom du createur de la fiche', `nom_modificateur` varchar(45) DEFAULT NULL COMMENT 'nom du modificateur de la fiche', `created` datetime DEFAULT NULL COMMENT 'date et heure de creation de la fiche', @@ -297,6 +301,7 @@ CREATE TABLE IF NOT EXISTS `users` ( `email` varchar(45) DEFAULT NULL, `role` varchar(45) DEFAULT NULL, `groupes_metier_id` int(11) DEFAULT NULL, + `groupe_thematique_id` int(11) DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `username_UNIQUE` (`username`), KEY `fk_users_groupes_travails1` (`groupes_metier_id`) @@ -334,6 +339,7 @@ CREATE TABLE IF NOT EXISTS `configurations` ( `emailGuest4` varchar(45) DEFAULT NULL, `emailGuest5` varchar(45) DEFAULT NULL, `test` tinyint(1) DEFAULT NULL, + `prix_inventaire_administratif` int( 10 ) DEFAULT '800', PRIMARY KEY (`id`), UNIQUE KEY `nom_UNIQUE` (`nom`) ); @@ -391,8 +397,12 @@ ALTER TABLE `suivis` -- Contraintes pour la table `users` -- ALTER TABLE `users` - ADD CONSTRAINT `fk_users_groupes_travails1` FOREIGN KEY (`groupes_metier_id`) REFERENCES `groupes_metiers` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION; + ADD CONSTRAINT `fk_users_groupes_travails1` FOREIGN KEY (`groupes_metier_id`) REFERENCES `groupes_metiers` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, + ADD CONSTRAINT `fk_users_groupe_thematique_id` FOREIGN KEY (`groupe_thematique_id`) REFERENCES `groupes_thematiques` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION; +-- Insertion par défaut +Insert into type_suivis(id, nom) values (9, 'Panne'); +Insert into sites(id, nom) values (9, 'N/A'); -- Insertion par défaut pour la table configuration Insert into `configurations`(`nom`, `mode_install`, `mode_debug`, `use_ldap`, `host_ldap`, `port_ldap`, `authentificationType_ldap`, `baseDn_ldap`, `filter_ldap`, `labName`, `labNameShort`, `labPresent`, `labUmr`, `hasPrinter`, `emailGuest1`, `emailGuest2`, `emailGuest3`) values ('default', '1', '0', '0', '', '', 'xxx', '', '', 'LABONAME', 'LABO', 'du ', '', '0', '', '', ''); diff --git a/database/update/.gitignore b/database/update/.gitignore index 853f568..aee2610 100644 --- a/database/update/.gitignore +++ b/database/update/.gitignore @@ -4,3 +4,4 @@ /db-update-2016-05-12.sql~ /db-update-2016-04-25.sql~ /db-update-2016-06-03.sql~ +/db-update-2016-06-13.sql~ diff --git a/database/update/db-update-2016-06-13.sql b/database/update/db-update-2016-06-13.sql new file mode 100644 index 0000000..28a720c --- /dev/null +++ b/database/update/db-update-2016-06-13.sql @@ -0,0 +1,14 @@ +Insert into type_suivis(id, nom) values (9, 'Panne'); +Insert into sites(id, nom) values (9, 'N/A'); + +ALTER TABLE `suivis` ADD `panne_resolu` tinyint(1) DEFAULT 1; + +ALTER TABLE `materiels` ADD `date_fin_garantie` date DEFAULT NULL; +ALTER TABLE `materiels` ADD `duree_garantie` int(10) DEFAULT NULL; +ALTER TABLE `materiels` ADD `unite_duree_garantie` varchar (30) DEFAULT NULL; + +ALTER TABLE `configurations` ADD `prix_inventaire_administratif` int( 10 ) DEFAULT '800'; + +ALTER TABLE `users` ADD `groupe_thematique_id` int(11) DEFAULT NULL; +ALTER TABLE `users` + ADD CONSTRAINT `fk_users_groupe_thematique_id` FOREIGN KEY (`groupe_thematique_id`) REFERENCES `groupes_thematiques` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION; diff --git a/database/update/update_Donnees_IAS_Labinvent2.sql b/database/update/update_Donnees_IAS_Labinvent2.sql index e899239..e21a822 100644 --- a/database/update/update_Donnees_IAS_Labinvent2.sql +++ b/database/update/update_Donnees_IAS_Labinvent2.sql @@ -233,4 +233,21 @@ ALTER TABLE `suivis` DROP `type_intervention`; Alter table `suivis` Add `type_frequence` VARCHAR(30) DEFAULT NULL; + +Insert into type_suivis(id, nom) values (9, 'Panne'); +Insert into sites(id, nom) values (9, 'N/A'); + +ALTER TABLE `suivis` ADD `panne_resolu` tinyint(1) DEFAULT 1; + +ALTER TABLE `materiels` ADD `date_fin_garantie` date DEFAULT NULL; +ALTER TABLE `materiels` ADD `duree_garantie` int(10) DEFAULT NULL; +ALTER TABLE `materiels` ADD `unite_duree_garantie` varchar (30) DEFAULT NULL; + +ALTER TABLE `configurations` ADD `prix_inventaire_administratif` int( 10 ) DEFAULT '800'; + +ALTER TABLE `users` ADD `groupe_thematique_id` int(11) DEFAULT NULL; +ALTER TABLE `users` + ADD CONSTRAINT `fk_users_groupe_thematique_id` FOREIGN KEY (`groupe_thematique_id`) REFERENCES `groupes_thematiques` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION; + + COMMIT; diff --git a/database/update/update_Donnees_IRAP_Labinvent2.sql b/database/update/update_Donnees_IRAP_Labinvent2.sql index 02c5ef7..2928a8b 100644 --- a/database/update/update_Donnees_IRAP_Labinvent2.sql +++ b/database/update/update_Donnees_IRAP_Labinvent2.sql @@ -133,4 +133,21 @@ ALTER TABLE `documents` ADD CONSTRAINT `fk_documents_materiel_id` FOREIGN KEY (`materiel_id`) REFERENCES `materiels` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, ADD CONSTRAINT `fk_documents_suivi_id` FOREIGN KEY (`suivi_id`) REFERENCES `suivis` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION; + +Insert into type_suivis(id, nom) values (9, 'Panne'); +Insert into sites(id, nom) values (9, 'N/A'); + +ALTER TABLE `suivis` ADD `panne_resolu` tinyint(1) DEFAULT 1; + +ALTER TABLE `materiels` ADD `date_fin_garantie` date DEFAULT NULL; +ALTER TABLE `materiels` ADD `duree_garantie` int(10) DEFAULT NULL; +ALTER TABLE `materiels` ADD `unite_duree_garantie` varchar (30) DEFAULT NULL; + +ALTER TABLE `configurations` ADD `prix_inventaire_administratif` int( 10 ) DEFAULT '800'; + +ALTER TABLE `users` ADD `groupe_thematique_id` int(11) DEFAULT NULL; +ALTER TABLE `users` + ADD CONSTRAINT `fk_users_groupe_thematique_id` FOREIGN KEY (`groupe_thematique_id`) REFERENCES `groupes_thematiques` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION; + + COMMIT; diff --git a/src/Model/Entity/Configuration.php b/src/Model/Entity/Configuration.php index d30f53d..897c5ce 100644 --- a/src/Model/Entity/Configuration.php +++ b/src/Model/Entity/Configuration.php @@ -30,6 +30,7 @@ use Cake\ORM\Entity; * @property string $emailGuest4 * @property string $emailGuest5 * @property bool $test + * @property int $prix_inventaire_administratif */ class Configuration extends Entity { diff --git a/src/Model/Entity/GroupesThematique.php b/src/Model/Entity/GroupesThematique.php index d4a0eaf..602aa96 100755 --- a/src/Model/Entity/GroupesThematique.php +++ b/src/Model/Entity/GroupesThematique.php @@ -10,6 +10,7 @@ use Cake\ORM\Entity; * @property string $nom * @property string $description * @property \App\Model\Entity\Materiel[] $materiels + * @property \App\Model\Entity\User[] $users */ class GroupesThematique extends Entity { diff --git a/src/Model/Entity/Materiel.php b/src/Model/Entity/Materiel.php index e68cd60..dca4d1c 100755 --- a/src/Model/Entity/Materiel.php +++ b/src/Model/Entity/Materiel.php @@ -41,6 +41,9 @@ use Cake\ORM\Entity; * @property string $nom_modificateur * @property \Cake\I18n\Time $created * @property \Cake\I18n\Time $modified + * @property \Cake\I18n\Time $date_fin_garantie + * @property int $duree_garantie + * @property string $unite_duree_garantie * @property \Cake\I18n\Time $date_reception * @property int $organisme_id * @property \App\Model\Entity\Organisme $organisme diff --git a/src/Model/Entity/Suivi.php b/src/Model/Entity/Suivi.php index 53a6c3d..cfe2c04 100755 --- a/src/Model/Entity/Suivi.php +++ b/src/Model/Entity/Suivi.php @@ -18,6 +18,7 @@ use Cake\ORM\Entity; * @property string $commentaire * @property string $nom_createur * @property string $nom_modificateur + * @property bool panne_resolu * @property \Cake\I18n\Time $created * @property \Cake\I18n\Time $modified * @property \App\Model\Entity\Document[] $documents diff --git a/src/Model/Entity/User.php b/src/Model/Entity/User.php index 194e67c..4373ab3 100755 --- a/src/Model/Entity/User.php +++ b/src/Model/Entity/User.php @@ -14,7 +14,9 @@ use Cake\Auth\DefaultPasswordHasher; * @property string $email * @property string $role * @property int $groupes_metier_id + * @property int $groupes_thematique_id * @property \App\Model\Entity\GroupesMetier $groupes_metier + * @property \App\Model\Entity\GroupesThematique $groupes_thematique */ class User extends Entity { diff --git a/src/Model/Table/ConfigurationsTable.php b/src/Model/Table/ConfigurationsTable.php index 0f98786..06d7151 100644 --- a/src/Model/Table/ConfigurationsTable.php +++ b/src/Model/Table/ConfigurationsTable.php @@ -115,6 +115,10 @@ class ConfigurationsTable extends Table $validator ->allowEmpty('test'); + + $validator + ->allowEmpty('prix_inventaire_administratif'); + return $validator; } diff --git a/src/Model/Table/GroupesThematiquesTable.php b/src/Model/Table/GroupesThematiquesTable.php index 2615dc8..a509b87 100755 --- a/src/Model/Table/GroupesThematiquesTable.php +++ b/src/Model/Table/GroupesThematiquesTable.php @@ -11,6 +11,7 @@ use Cake\Validation\Validator; * GroupesThematiques Model * * @property \Cake\ORM\Association\HasMany $Materiels + * @property \Cake\ORM\Association\HasMany $Users */ class GroupesThematiquesTable extends AppTable { @@ -32,6 +33,9 @@ class GroupesThematiquesTable extends AppTable $this->hasMany('Materiels', [ 'foreignKey' => 'groupes_thematique_id' ]); + $this->hasMany('Users', [ + 'foreignKey' => 'groupes_thematique_id' + ]); } /** diff --git a/src/Model/Table/MaterielsTable.php b/src/Model/Table/MaterielsTable.php index a22d43d..06ad1d7 100755 --- a/src/Model/Table/MaterielsTable.php +++ b/src/Model/Table/MaterielsTable.php @@ -183,6 +183,16 @@ class MaterielsTable extends AppTable $validator ->allowEmpty('date_reception'); + + $validator + ->allowEmpty('date_fin_garantie'); + + $validator + ->allowEmpty('duree_garantie'); + + $validator + ->allowEmpty('unite_duree_garantie'); + return $validator; } diff --git a/src/Model/Table/SuivisTable.php b/src/Model/Table/SuivisTable.php index 853b89b..3a9f186 100755 --- a/src/Model/Table/SuivisTable.php +++ b/src/Model/Table/SuivisTable.php @@ -79,6 +79,9 @@ class SuivisTable extends AppTable $validator ->allowEmpty('type_frequence'); + + $validator + ->allowEmpty('panne_resolu'); $validator ->allowEmpty('commentaire') diff --git a/src/Model/Table/UsersTable.php b/src/Model/Table/UsersTable.php index 0f20b14..350526e 100755 --- a/src/Model/Table/UsersTable.php +++ b/src/Model/Table/UsersTable.php @@ -33,6 +33,9 @@ class UsersTable extends AppTable $this->belongsTo('GroupesMetiers', [ 'foreignKey' => 'groupes_metier_id' ]); + $this->belongsTo('GroupesThematiques', [ + 'foreignKey' => 'groupes_thematique_id' + ]); } /** @@ -85,6 +88,7 @@ class UsersTable extends AppTable $rules->add($rules->isUnique(['username'])); $rules->add($rules->isUnique(['email'])); $rules->add($rules->existsIn(['groupes_metier_id'], 'GroupesMetiers')); + $rules->add($rules->existsIn(['groupes_thematique_id'], 'GroupesThematiques')); return $rules; } diff --git a/src/Template/Emprunts/add.ctp b/src/Template/Emprunts/add.ctp index 31483c2..65308d1 100755 --- a/src/Template/Emprunts/add.ctp +++ b/src/Template/Emprunts/add.ctp @@ -70,6 +70,7 @@ echo $this->Form->input('site_id', [ 'label' => 'Site', 'options' => $sites, + 'default' => 9, 'div' => 'input required', ]); echo $this->Form->input ( 'e_lieu_detail', ['label' => 'Pièce']); diff --git a/src/Template/Emprunts/edit.ctp b/src/Template/Emprunts/edit.ctp index 5137505..5da44ed 100755 --- a/src/Template/Emprunts/edit.ctp +++ b/src/Template/Emprunts/edit.ctp @@ -69,6 +69,7 @@ echo $this->Form->input('site_id', [ 'label' => 'Site', 'options' => $sites, + 'default' => 9, 'div' => 'input required', ]); echo $this->Form->input ( 'e_lieu_detail', ['label' => 'Pièce']); diff --git a/src/Template/Layout/default.ctp b/src/Template/Layout/default.ctp index 6f6caf5..ee6c927 100755 --- a/src/Template/Layout/default.ctp +++ b/src/Template/Layout/default.ctp @@ -94,7 +94,7 @@ $cakeDescription = 'Labinvent 2.0'; - VERSION 2.4.3.9 (13/06/2016) + VERSION 2.4.3.10 (13/06/2016) diff --git a/src/Template/Materiels/add.ctp b/src/Template/Materiels/add.ctp index bd131a8..b15ecd7 100755 --- a/src/Template/Materiels/add.ctp +++ b/src/Template/Materiels/add.ctp @@ -33,7 +33,7 @@ else { $Groupes_thematique_id = 1; $Groupes_metier_id = 1; $Lieu_detail = NULL; - $Site_id = 1; + $Site_id = 9; } ?> diff --git a/src/Template/Materiels/edit.ctp b/src/Template/Materiels/edit.ctp index 5050e81..d1082f5 100755 --- a/src/Template/Materiels/edit.ctp +++ b/src/Template/Materiels/edit.ctp @@ -113,7 +113,7 @@ if ($IS_VALIDATED) echo $this->Form->input('site_id', [ 'options' => $sites, 'style' => 'width: 380px', - 'default' => 1, + 'default' => 9, 'disabled' => $isReadonlyField('site_id', $myReadonlyFields) ]); diff --git a/tests/Fixture/ConfigurationsFixture.php b/tests/Fixture/ConfigurationsFixture.php index efcbd7f..6a864b0 100644 --- a/tests/Fixture/ConfigurationsFixture.php +++ b/tests/Fixture/ConfigurationsFixture.php @@ -41,6 +41,7 @@ class ConfigurationsFixture extends TestFixture 'emailGuest4' => ['type' => 'string', 'length' => 45, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null, 'fixed' => null], 'emailGuest5' => ['type' => 'string', 'length' => 45, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null, 'fixed' => null], 'test' => ['type' => 'boolean', 'length' => null, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null], + 'prix_inventaire_administratif' => ['type' => 'integer', 'length' => 10, 'null' => true, 'default' => 800, 'comment' => '', 'precision' => null], '_constraints' => [ 'primary' => ['type' => 'primary', 'columns' => ['id'], 'length' => []], 'nom_UNIQUE' => ['type' => 'unique', 'columns' => ['nom'], 'length' => []], @@ -82,7 +83,8 @@ class ConfigurationsFixture extends TestFixture 'emailGuest3' => 'Lorem ipsum dolor sit amet', 'emailGuest4' => 'Lorem ipsum dolor sit amet', 'emailGuest5' => 'Lorem ipsum dolor sit amet', - 'test' => 1 + 'test' => 1, + 'prix_inventaire_administratif' => 800, ], ]; } diff --git a/tests/Fixture/MaterielsFixture.php b/tests/Fixture/MaterielsFixture.php index 81def9d..ee1b1f2 100755 --- a/tests/Fixture/MaterielsFixture.php +++ b/tests/Fixture/MaterielsFixture.php @@ -28,7 +28,10 @@ class MaterielsFixture extends TestFixture 'materiel_technique' => ['type' => 'boolean', 'length' => null, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null], 'status' => ['type' => 'string', 'length' => 15, 'null' => true, 'default' => 'CREATED', 'comment' => '', 'precision' => null, 'fixed' => null], 'date_acquisition' => ['type' => 'date', 'length' => null, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null], - 'fournisseur' => ['type' => 'string', 'length' => 50, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null, 'fixed' => null], + 'date_fin_garantie' => ['type' => 'date', 'length' => null, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null], + 'duree_garantie' => ['type' => 'integer', 'length' => 10, 'unsigned' => false, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null], + 'unite_duree_garantie' => ['type' => 'string', 'length' => 30, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null, 'fixed' => null], + 'fournisseur' => ['type' => 'string', 'length' => 50, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null, 'fixed' => null], 'prix_ht' => ['type' => 'float', 'length' => 45, 'precision' => 0, 'unsigned' => true, 'null' => true, 'default' => null, 'comment' => ''], 'eotp' => ['type' => 'string', 'length' => 45, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null, 'fixed' => null], 'numero_commande' => ['type' => 'string', 'length' => 45, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null, 'fixed' => null], diff --git a/tests/Fixture/SuivisFixture.php b/tests/Fixture/SuivisFixture.php index 954968f..54b08e0 100755 --- a/tests/Fixture/SuivisFixture.php +++ b/tests/Fixture/SuivisFixture.php @@ -25,6 +25,7 @@ class SuivisFixture extends TestFixture 'organisme' => ['type' => 'string', 'length' => 50, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null, 'fixed' => null], 'frequence' => ['type' => 'integer', 'length' => 11, 'unsigned' => false, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null, 'autoIncrement' => null], 'type_frequence' => ['type' => 'string', 'length' =>30, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null, 'fixed' => null], + 'panne_resolu' => ['type' => 'boolean', 'length' =>null, 'null' => true, 'default' => 1, 'comment' => '', 'precision' => null, 'fixed' => null], 'commentaire' => ['type' => 'string', 'length' => 100, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null, 'fixed' => null], 'nom_createur' => ['type' => 'string', 'length' => 45, 'null' => true, 'default' => null, 'comment' => 'nom du createur de la fiche', 'precision' => null, 'fixed' => null], 'nom_modificateur' => ['type' => 'string', 'length' => 45, 'null' => true, 'default' => null, 'comment' => 'nom du modificateur de la fiche', 'precision' => null, 'fixed' => null], diff --git a/tests/Fixture/UsersFixture.php b/tests/Fixture/UsersFixture.php index ae5c2b7..94a1f52 100755 --- a/tests/Fixture/UsersFixture.php +++ b/tests/Fixture/UsersFixture.php @@ -24,6 +24,7 @@ class UsersFixture extends TestFixture 'email' => ['type' => 'string', 'length' => 45, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null, 'fixed' => null], 'role' => ['type' => 'string', 'length' => 45, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null, 'fixed' => null], 'groupes_metier_id' => ['type' => 'integer', 'length' => 11, 'unsigned' => false, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null, 'autoIncrement' => null], + 'groupes_thematique_id' => ['type' => 'integer', 'length' => 11, 'unsigned' => false, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null, 'autoIncrement' => null], '_indexes' => [ 'fk_users_groupes_travails1' => ['type' => 'index', 'columns' => ['groupes_metier_id'], 'length' => []], ], @@ -31,6 +32,7 @@ class UsersFixture extends TestFixture 'primary' => ['type' => 'primary', 'columns' => ['id'], 'length' => []], 'login_UNIQUE' => ['type' => 'unique', 'columns' => ['username'], 'length' => []], 'fk_users_groupes_travails1' => ['type' => 'foreign', 'columns' => ['groupes_metier_id'], 'references' => ['groupes_metiers', 'id'], 'update' => 'noAction', 'delete' => 'noAction', 'length' => []], + 'fk_users_groupe_thematique_id' => ['type' => 'foreign', 'columns' => ['groupes_thematique_id'], 'references' => ['groupes_thematiques', 'id'], 'update' => 'noAction', 'delete' => 'noAction', 'length' => []], ], '_options' => [ 'engine' => 'InnoDB', @@ -52,7 +54,8 @@ class UsersFixture extends TestFixture 'password' => '$2y$10$VtYdA8Evkc.K.VpvqmF9wui5hc9ep19f8ukWBeFBIlunXSHPqw.K2', 'email' => 'testa@test.fr', 'role' => 'Super Administrateur', - 'groupes_metier_id' => 1 + 'groupes_metier_id' => 1, + 'groupes_thematique_id' => 1 ], [ 'id' => 2, @@ -61,7 +64,8 @@ class UsersFixture extends TestFixture 'password' => '$2y$10$VtYdA8Evkc.K.VpvqmF9wui5hc9ep19f8ukWBeFBIlunXSHPqw.K2', 'email' => 'testz@test.fr', 'role' => 'Administration Plus', - 'groupes_metier_id' => 1 + 'groupes_metier_id' => 1, + 'groupes_thematique_id' => 1 ], [ 'id' => 3, @@ -70,7 +74,8 @@ class UsersFixture extends TestFixture 'password' => '$2y$10$VtYdA8Evkc.K.VpvqmF9wui5hc9ep19f8ukWBeFBIlunXSHPqw.K2', 'email' => 'teste@test.fr', 'role' => 'Administration', - 'groupes_metier_id' => 1 + 'groupes_metier_id' => 1, + 'groupes_thematique_id' => 1 ], [ 'id' => 4, @@ -79,7 +84,8 @@ class UsersFixture extends TestFixture 'password' => '$2y$10$VtYdA8Evkc.K.VpvqmF9wui5hc9ep19f8ukWBeFBIlunXSHPqw.K2', 'email' => 'testr@test.fr', 'role' => 'Responsable', - 'groupes_metier_id' => 1 + 'groupes_metier_id' => 1, + 'groupes_thematique_id' => 1 ], [ 'id' => 5, @@ -88,7 +94,8 @@ class UsersFixture extends TestFixture 'password' => '$2y$10$VtYdA8Evkc.K.VpvqmF9wui5hc9ep19f8ukWBeFBIlunXSHPqw.K2', 'email' => 'testt@test.fr', 'role' => 'Utilisateur', - 'groupes_metier_id' => 1 + 'groupes_metier_id' => 1, + 'groupes_thematique_id' => 1 ], ]; } -- libgit2 0.21.2