date.chapril.org-framadate/app/classes/Framadate/Migrations/Version20180419180000.php

66 lines
2.1 KiB
PHP
Raw Normal View History

Collecting Polled Users Emails Modification de la BDD : ajout de la colonne mail dans la table vote Modification de la BDD : ajout de la colonne mail dans la table vote (bis) MAJ de VoteRepository : méthode insert et update MAJ de PollService : méthodes updateVote, addVote et splitVotes Modification studs.php, adminstuds.php et vote_table_date.tpl : OK pour l'ajout d'un vote avec nom + mail Modification de vote_table_classic.tpl : OK pour l'ajout d'un vote avec nom + mail Ajout d'un bouton enveloppe pour chaque colonne avec méthode de traitement pour test Le numéro de la colonne est enfin récupéré correctement Implémentation récupération des adresses mails des sondés intéressants dans adminstuds.php et appel d'un fichier display_mails.tpl qui affichent ces adresses mails. Extension du traitement pour les sondages classic Ajout récupération des adresses des non aussi, et ajouts de tests pour l'affichage Changement des input type=text en type=email Corrections automatiques pour passage pipelines Corrections suite aux remarques sur la merge request Corrections 2 suite aux remarques sur la merge request Corrections 3 suite aux remarques sur la merge request Modif BDD : ajout colonne collect_mail dans poll Modif classes Form, PollRepository Passage de la collecte des mails des sondés en fonctionalité optionnelle Si la collecte de mail est activée, la saisie du mail est obligatoire Ajout avertissements collect_mail + editableByAll dans création de sondage et tableaux de vote Update create poll string and put a danger background on warning Signed-off-by: Thomas Citharel <tcit@tcit.fr> Translation strings updated and better position for the email public warning message Also, a CSS tweak and cleanup Signed-off-by: Thomas Citharel <tcit@tcit.fr> CS Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2018-03-18 10:40:38 +01:00
<?php
/**
* This software is governed by the CeCILL-B license. If a copy of this license
* is not distributed with this file, you can obtain one at
* http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.txt
*
* Authors of STUdS (initial project): Guilhem BORGHESI (borghesi@unistra.fr) and Raphaël DROZ
* Authors of Framadate/OpenSondage: Framasoft (https://github.com/framasoft)
*
* =============================
*
* Ce logiciel est régi par la licence CeCILL-B. Si une copie de cette licence
* ne se trouve pas avec ce fichier vous pouvez l'obtenir sur
* http://www.cecill.info/licences/Licence_CeCILL-B_V1-fr.txt
*
* Auteurs de STUdS (projet initial) : Guilhem BORGHESI (borghesi@unistra.fr) et Raphaël DROZ
* Auteurs de Framadate/OpenSondage : Framasoft (https://github.com/framasoft)
*/
Make Framadate compatible with PostgreSQL and great again ! * Move the database handling to Doctrine DBAL * Move Migrations to Doctrine Migrations * Rename migrations for Doctrine Migrations Uses * Fix Migrations * Change config parameters, introduce db name, host and port parameters and get rid of database url * Change install form for this * Add a CLI command to make migrations * Add config.test.php to be used with APP_ENV=test for testing Signed-off-by: Thomas Citharel <tcit@tcit.fr> CS Signed-off-by: Thomas Citharel <tcit@tcit.fr> Add sqlite to CI and execute migration in test env Signed-off-by: Thomas Citharel <tcit@tcit.fr> Typo Signed-off-by: Thomas Citharel <tcit@tcit.fr> SQLite is already inside the image... Signed-off-by: Thomas Citharel <tcit@tcit.fr> Rebase two new migrations Signed-off-by: Thomas Citharel <tcit@tcit.fr> Move from trait to abstract class and remove legacy migration table after checks Signed-off-by: Thomas Citharel <tcit@tcit.fr> CS Signed-off-by: Thomas Citharel <tcit@tcit.fr> Move doctrine command path inside CI Signed-off-by: Thomas Citharel <tcit@tcit.fr> Move abstract migration class to correct namespace and remove unused command Signed-off-by: Thomas Citharel <tcit@tcit.fr> CS Signed-off-by: Thomas Citharel <tcit@tcit.fr> Check for legacy migration table existence Signed-off-by: Thomas Citharel <tcit@tcit.fr> Check if legacy migration table exists before deleting it Signed-off-by: Thomas Citharel <tcit@tcit.fr> Add messages for skipped migrations and fix an issue with MySQL ERR_NO_DATE Migration Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2018-04-18 16:16:22 +02:00
namespace DoctrineMigrations;
Collecting Polled Users Emails Modification de la BDD : ajout de la colonne mail dans la table vote Modification de la BDD : ajout de la colonne mail dans la table vote (bis) MAJ de VoteRepository : méthode insert et update MAJ de PollService : méthodes updateVote, addVote et splitVotes Modification studs.php, adminstuds.php et vote_table_date.tpl : OK pour l'ajout d'un vote avec nom + mail Modification de vote_table_classic.tpl : OK pour l'ajout d'un vote avec nom + mail Ajout d'un bouton enveloppe pour chaque colonne avec méthode de traitement pour test Le numéro de la colonne est enfin récupéré correctement Implémentation récupération des adresses mails des sondés intéressants dans adminstuds.php et appel d'un fichier display_mails.tpl qui affichent ces adresses mails. Extension du traitement pour les sondages classic Ajout récupération des adresses des non aussi, et ajouts de tests pour l'affichage Changement des input type=text en type=email Corrections automatiques pour passage pipelines Corrections suite aux remarques sur la merge request Corrections 2 suite aux remarques sur la merge request Corrections 3 suite aux remarques sur la merge request Modif BDD : ajout colonne collect_mail dans poll Modif classes Form, PollRepository Passage de la collecte des mails des sondés en fonctionalité optionnelle Si la collecte de mail est activée, la saisie du mail est obligatoire Ajout avertissements collect_mail + editableByAll dans création de sondage et tableaux de vote Update create poll string and put a danger background on warning Signed-off-by: Thomas Citharel <tcit@tcit.fr> Translation strings updated and better position for the email public warning message Also, a CSS tweak and cleanup Signed-off-by: Thomas Citharel <tcit@tcit.fr> CS Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2018-03-18 10:40:38 +01:00
Make Framadate compatible with PostgreSQL and great again ! * Move the database handling to Doctrine DBAL * Move Migrations to Doctrine Migrations * Rename migrations for Doctrine Migrations Uses * Fix Migrations * Change config parameters, introduce db name, host and port parameters and get rid of database url * Change install form for this * Add a CLI command to make migrations * Add config.test.php to be used with APP_ENV=test for testing Signed-off-by: Thomas Citharel <tcit@tcit.fr> CS Signed-off-by: Thomas Citharel <tcit@tcit.fr> Add sqlite to CI and execute migration in test env Signed-off-by: Thomas Citharel <tcit@tcit.fr> Typo Signed-off-by: Thomas Citharel <tcit@tcit.fr> SQLite is already inside the image... Signed-off-by: Thomas Citharel <tcit@tcit.fr> Rebase two new migrations Signed-off-by: Thomas Citharel <tcit@tcit.fr> Move from trait to abstract class and remove legacy migration table after checks Signed-off-by: Thomas Citharel <tcit@tcit.fr> CS Signed-off-by: Thomas Citharel <tcit@tcit.fr> Move doctrine command path inside CI Signed-off-by: Thomas Citharel <tcit@tcit.fr> Move abstract migration class to correct namespace and remove unused command Signed-off-by: Thomas Citharel <tcit@tcit.fr> CS Signed-off-by: Thomas Citharel <tcit@tcit.fr> Check for legacy migration table existence Signed-off-by: Thomas Citharel <tcit@tcit.fr> Check if legacy migration table exists before deleting it Signed-off-by: Thomas Citharel <tcit@tcit.fr> Add messages for skipped migrations and fix an issue with MySQL ERR_NO_DATE Migration Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2018-04-18 16:16:22 +02:00
use Doctrine\DBAL\Schema\Schema;
use Framadate\AbstractMigration;
Collecting Polled Users Emails Modification de la BDD : ajout de la colonne mail dans la table vote Modification de la BDD : ajout de la colonne mail dans la table vote (bis) MAJ de VoteRepository : méthode insert et update MAJ de PollService : méthodes updateVote, addVote et splitVotes Modification studs.php, adminstuds.php et vote_table_date.tpl : OK pour l'ajout d'un vote avec nom + mail Modification de vote_table_classic.tpl : OK pour l'ajout d'un vote avec nom + mail Ajout d'un bouton enveloppe pour chaque colonne avec méthode de traitement pour test Le numéro de la colonne est enfin récupéré correctement Implémentation récupération des adresses mails des sondés intéressants dans adminstuds.php et appel d'un fichier display_mails.tpl qui affichent ces adresses mails. Extension du traitement pour les sondages classic Ajout récupération des adresses des non aussi, et ajouts de tests pour l'affichage Changement des input type=text en type=email Corrections automatiques pour passage pipelines Corrections suite aux remarques sur la merge request Corrections 2 suite aux remarques sur la merge request Corrections 3 suite aux remarques sur la merge request Modif BDD : ajout colonne collect_mail dans poll Modif classes Form, PollRepository Passage de la collecte des mails des sondés en fonctionalité optionnelle Si la collecte de mail est activée, la saisie du mail est obligatoire Ajout avertissements collect_mail + editableByAll dans création de sondage et tableaux de vote Update create poll string and put a danger background on warning Signed-off-by: Thomas Citharel <tcit@tcit.fr> Translation strings updated and better position for the email public warning message Also, a CSS tweak and cleanup Signed-off-by: Thomas Citharel <tcit@tcit.fr> CS Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2018-03-18 10:40:38 +01:00
use Framadate\Utils;
/**
Make Framadate compatible with PostgreSQL and great again ! * Move the database handling to Doctrine DBAL * Move Migrations to Doctrine Migrations * Rename migrations for Doctrine Migrations Uses * Fix Migrations * Change config parameters, introduce db name, host and port parameters and get rid of database url * Change install form for this * Add a CLI command to make migrations * Add config.test.php to be used with APP_ENV=test for testing Signed-off-by: Thomas Citharel <tcit@tcit.fr> CS Signed-off-by: Thomas Citharel <tcit@tcit.fr> Add sqlite to CI and execute migration in test env Signed-off-by: Thomas Citharel <tcit@tcit.fr> Typo Signed-off-by: Thomas Citharel <tcit@tcit.fr> SQLite is already inside the image... Signed-off-by: Thomas Citharel <tcit@tcit.fr> Rebase two new migrations Signed-off-by: Thomas Citharel <tcit@tcit.fr> Move from trait to abstract class and remove legacy migration table after checks Signed-off-by: Thomas Citharel <tcit@tcit.fr> CS Signed-off-by: Thomas Citharel <tcit@tcit.fr> Move doctrine command path inside CI Signed-off-by: Thomas Citharel <tcit@tcit.fr> Move abstract migration class to correct namespace and remove unused command Signed-off-by: Thomas Citharel <tcit@tcit.fr> CS Signed-off-by: Thomas Citharel <tcit@tcit.fr> Check for legacy migration table existence Signed-off-by: Thomas Citharel <tcit@tcit.fr> Check if legacy migration table exists before deleting it Signed-off-by: Thomas Citharel <tcit@tcit.fr> Add messages for skipped migrations and fix an issue with MySQL ERR_NO_DATE Migration Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2018-04-18 16:16:22 +02:00
* This migration adds the column mail in the vote table
Collecting Polled Users Emails Modification de la BDD : ajout de la colonne mail dans la table vote Modification de la BDD : ajout de la colonne mail dans la table vote (bis) MAJ de VoteRepository : méthode insert et update MAJ de PollService : méthodes updateVote, addVote et splitVotes Modification studs.php, adminstuds.php et vote_table_date.tpl : OK pour l'ajout d'un vote avec nom + mail Modification de vote_table_classic.tpl : OK pour l'ajout d'un vote avec nom + mail Ajout d'un bouton enveloppe pour chaque colonne avec méthode de traitement pour test Le numéro de la colonne est enfin récupéré correctement Implémentation récupération des adresses mails des sondés intéressants dans adminstuds.php et appel d'un fichier display_mails.tpl qui affichent ces adresses mails. Extension du traitement pour les sondages classic Ajout récupération des adresses des non aussi, et ajouts de tests pour l'affichage Changement des input type=text en type=email Corrections automatiques pour passage pipelines Corrections suite aux remarques sur la merge request Corrections 2 suite aux remarques sur la merge request Corrections 3 suite aux remarques sur la merge request Modif BDD : ajout colonne collect_mail dans poll Modif classes Form, PollRepository Passage de la collecte des mails des sondés en fonctionalité optionnelle Si la collecte de mail est activée, la saisie du mail est obligatoire Ajout avertissements collect_mail + editableByAll dans création de sondage et tableaux de vote Update create poll string and put a danger background on warning Signed-off-by: Thomas Citharel <tcit@tcit.fr> Translation strings updated and better position for the email public warning message Also, a CSS tweak and cleanup Signed-off-by: Thomas Citharel <tcit@tcit.fr> CS Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2018-03-18 10:40:38 +01:00
*
* @package Framadate\Migration
Make Framadate compatible with PostgreSQL and great again ! * Move the database handling to Doctrine DBAL * Move Migrations to Doctrine Migrations * Rename migrations for Doctrine Migrations Uses * Fix Migrations * Change config parameters, introduce db name, host and port parameters and get rid of database url * Change install form for this * Add a CLI command to make migrations * Add config.test.php to be used with APP_ENV=test for testing Signed-off-by: Thomas Citharel <tcit@tcit.fr> CS Signed-off-by: Thomas Citharel <tcit@tcit.fr> Add sqlite to CI and execute migration in test env Signed-off-by: Thomas Citharel <tcit@tcit.fr> Typo Signed-off-by: Thomas Citharel <tcit@tcit.fr> SQLite is already inside the image... Signed-off-by: Thomas Citharel <tcit@tcit.fr> Rebase two new migrations Signed-off-by: Thomas Citharel <tcit@tcit.fr> Move from trait to abstract class and remove legacy migration table after checks Signed-off-by: Thomas Citharel <tcit@tcit.fr> CS Signed-off-by: Thomas Citharel <tcit@tcit.fr> Move doctrine command path inside CI Signed-off-by: Thomas Citharel <tcit@tcit.fr> Move abstract migration class to correct namespace and remove unused command Signed-off-by: Thomas Citharel <tcit@tcit.fr> CS Signed-off-by: Thomas Citharel <tcit@tcit.fr> Check for legacy migration table existence Signed-off-by: Thomas Citharel <tcit@tcit.fr> Check if legacy migration table exists before deleting it Signed-off-by: Thomas Citharel <tcit@tcit.fr> Add messages for skipped migrations and fix an issue with MySQL ERR_NO_DATE Migration Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2018-04-18 16:16:22 +02:00
* @version 1.2
Collecting Polled Users Emails Modification de la BDD : ajout de la colonne mail dans la table vote Modification de la BDD : ajout de la colonne mail dans la table vote (bis) MAJ de VoteRepository : méthode insert et update MAJ de PollService : méthodes updateVote, addVote et splitVotes Modification studs.php, adminstuds.php et vote_table_date.tpl : OK pour l'ajout d'un vote avec nom + mail Modification de vote_table_classic.tpl : OK pour l'ajout d'un vote avec nom + mail Ajout d'un bouton enveloppe pour chaque colonne avec méthode de traitement pour test Le numéro de la colonne est enfin récupéré correctement Implémentation récupération des adresses mails des sondés intéressants dans adminstuds.php et appel d'un fichier display_mails.tpl qui affichent ces adresses mails. Extension du traitement pour les sondages classic Ajout récupération des adresses des non aussi, et ajouts de tests pour l'affichage Changement des input type=text en type=email Corrections automatiques pour passage pipelines Corrections suite aux remarques sur la merge request Corrections 2 suite aux remarques sur la merge request Corrections 3 suite aux remarques sur la merge request Modif BDD : ajout colonne collect_mail dans poll Modif classes Form, PollRepository Passage de la collecte des mails des sondés en fonctionalité optionnelle Si la collecte de mail est activée, la saisie du mail est obligatoire Ajout avertissements collect_mail + editableByAll dans création de sondage et tableaux de vote Update create poll string and put a danger background on warning Signed-off-by: Thomas Citharel <tcit@tcit.fr> Translation strings updated and better position for the email public warning message Also, a CSS tweak and cleanup Signed-off-by: Thomas Citharel <tcit@tcit.fr> CS Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2018-03-18 10:40:38 +01:00
*/
Make Framadate compatible with PostgreSQL and great again ! * Move the database handling to Doctrine DBAL * Move Migrations to Doctrine Migrations * Rename migrations for Doctrine Migrations Uses * Fix Migrations * Change config parameters, introduce db name, host and port parameters and get rid of database url * Change install form for this * Add a CLI command to make migrations * Add config.test.php to be used with APP_ENV=test for testing Signed-off-by: Thomas Citharel <tcit@tcit.fr> CS Signed-off-by: Thomas Citharel <tcit@tcit.fr> Add sqlite to CI and execute migration in test env Signed-off-by: Thomas Citharel <tcit@tcit.fr> Typo Signed-off-by: Thomas Citharel <tcit@tcit.fr> SQLite is already inside the image... Signed-off-by: Thomas Citharel <tcit@tcit.fr> Rebase two new migrations Signed-off-by: Thomas Citharel <tcit@tcit.fr> Move from trait to abstract class and remove legacy migration table after checks Signed-off-by: Thomas Citharel <tcit@tcit.fr> CS Signed-off-by: Thomas Citharel <tcit@tcit.fr> Move doctrine command path inside CI Signed-off-by: Thomas Citharel <tcit@tcit.fr> Move abstract migration class to correct namespace and remove unused command Signed-off-by: Thomas Citharel <tcit@tcit.fr> CS Signed-off-by: Thomas Citharel <tcit@tcit.fr> Check for legacy migration table existence Signed-off-by: Thomas Citharel <tcit@tcit.fr> Check if legacy migration table exists before deleting it Signed-off-by: Thomas Citharel <tcit@tcit.fr> Add messages for skipped migrations and fix an issue with MySQL ERR_NO_DATE Migration Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2018-04-18 16:16:22 +02:00
class Version20180419180000 extends AbstractMigration
{
Collecting Polled Users Emails Modification de la BDD : ajout de la colonne mail dans la table vote Modification de la BDD : ajout de la colonne mail dans la table vote (bis) MAJ de VoteRepository : méthode insert et update MAJ de PollService : méthodes updateVote, addVote et splitVotes Modification studs.php, adminstuds.php et vote_table_date.tpl : OK pour l'ajout d'un vote avec nom + mail Modification de vote_table_classic.tpl : OK pour l'ajout d'un vote avec nom + mail Ajout d'un bouton enveloppe pour chaque colonne avec méthode de traitement pour test Le numéro de la colonne est enfin récupéré correctement Implémentation récupération des adresses mails des sondés intéressants dans adminstuds.php et appel d'un fichier display_mails.tpl qui affichent ces adresses mails. Extension du traitement pour les sondages classic Ajout récupération des adresses des non aussi, et ajouts de tests pour l'affichage Changement des input type=text en type=email Corrections automatiques pour passage pipelines Corrections suite aux remarques sur la merge request Corrections 2 suite aux remarques sur la merge request Corrections 3 suite aux remarques sur la merge request Modif BDD : ajout colonne collect_mail dans poll Modif classes Form, PollRepository Passage de la collecte des mails des sondés en fonctionalité optionnelle Si la collecte de mail est activée, la saisie du mail est obligatoire Ajout avertissements collect_mail + editableByAll dans création de sondage et tableaux de vote Update create poll string and put a danger background on warning Signed-off-by: Thomas Citharel <tcit@tcit.fr> Translation strings updated and better position for the email public warning message Also, a CSS tweak and cleanup Signed-off-by: Thomas Citharel <tcit@tcit.fr> CS Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2018-03-18 10:40:38 +01:00
/**
* This method should describe in english what is the purpose of the migration class.
*
* @return string The description of the migration class
*/
Make Framadate compatible with PostgreSQL and great again ! * Move the database handling to Doctrine DBAL * Move Migrations to Doctrine Migrations * Rename migrations for Doctrine Migrations Uses * Fix Migrations * Change config parameters, introduce db name, host and port parameters and get rid of database url * Change install form for this * Add a CLI command to make migrations * Add config.test.php to be used with APP_ENV=test for testing Signed-off-by: Thomas Citharel <tcit@tcit.fr> CS Signed-off-by: Thomas Citharel <tcit@tcit.fr> Add sqlite to CI and execute migration in test env Signed-off-by: Thomas Citharel <tcit@tcit.fr> Typo Signed-off-by: Thomas Citharel <tcit@tcit.fr> SQLite is already inside the image... Signed-off-by: Thomas Citharel <tcit@tcit.fr> Rebase two new migrations Signed-off-by: Thomas Citharel <tcit@tcit.fr> Move from trait to abstract class and remove legacy migration table after checks Signed-off-by: Thomas Citharel <tcit@tcit.fr> CS Signed-off-by: Thomas Citharel <tcit@tcit.fr> Move doctrine command path inside CI Signed-off-by: Thomas Citharel <tcit@tcit.fr> Move abstract migration class to correct namespace and remove unused command Signed-off-by: Thomas Citharel <tcit@tcit.fr> CS Signed-off-by: Thomas Citharel <tcit@tcit.fr> Check for legacy migration table existence Signed-off-by: Thomas Citharel <tcit@tcit.fr> Check if legacy migration table exists before deleting it Signed-off-by: Thomas Citharel <tcit@tcit.fr> Add messages for skipped migrations and fix an issue with MySQL ERR_NO_DATE Migration Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2018-04-18 16:16:22 +02:00
public function description()
{
Collecting Polled Users Emails Modification de la BDD : ajout de la colonne mail dans la table vote Modification de la BDD : ajout de la colonne mail dans la table vote (bis) MAJ de VoteRepository : méthode insert et update MAJ de PollService : méthodes updateVote, addVote et splitVotes Modification studs.php, adminstuds.php et vote_table_date.tpl : OK pour l'ajout d'un vote avec nom + mail Modification de vote_table_classic.tpl : OK pour l'ajout d'un vote avec nom + mail Ajout d'un bouton enveloppe pour chaque colonne avec méthode de traitement pour test Le numéro de la colonne est enfin récupéré correctement Implémentation récupération des adresses mails des sondés intéressants dans adminstuds.php et appel d'un fichier display_mails.tpl qui affichent ces adresses mails. Extension du traitement pour les sondages classic Ajout récupération des adresses des non aussi, et ajouts de tests pour l'affichage Changement des input type=text en type=email Corrections automatiques pour passage pipelines Corrections suite aux remarques sur la merge request Corrections 2 suite aux remarques sur la merge request Corrections 3 suite aux remarques sur la merge request Modif BDD : ajout colonne collect_mail dans poll Modif classes Form, PollRepository Passage de la collecte des mails des sondés en fonctionalité optionnelle Si la collecte de mail est activée, la saisie du mail est obligatoire Ajout avertissements collect_mail + editableByAll dans création de sondage et tableaux de vote Update create poll string and put a danger background on warning Signed-off-by: Thomas Citharel <tcit@tcit.fr> Translation strings updated and better position for the email public warning message Also, a CSS tweak and cleanup Signed-off-by: Thomas Citharel <tcit@tcit.fr> CS Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2018-03-18 10:40:38 +01:00
return 'Add column mail in table vote';
}
/**
Make Framadate compatible with PostgreSQL and great again ! * Move the database handling to Doctrine DBAL * Move Migrations to Doctrine Migrations * Rename migrations for Doctrine Migrations Uses * Fix Migrations * Change config parameters, introduce db name, host and port parameters and get rid of database url * Change install form for this * Add a CLI command to make migrations * Add config.test.php to be used with APP_ENV=test for testing Signed-off-by: Thomas Citharel <tcit@tcit.fr> CS Signed-off-by: Thomas Citharel <tcit@tcit.fr> Add sqlite to CI and execute migration in test env Signed-off-by: Thomas Citharel <tcit@tcit.fr> Typo Signed-off-by: Thomas Citharel <tcit@tcit.fr> SQLite is already inside the image... Signed-off-by: Thomas Citharel <tcit@tcit.fr> Rebase two new migrations Signed-off-by: Thomas Citharel <tcit@tcit.fr> Move from trait to abstract class and remove legacy migration table after checks Signed-off-by: Thomas Citharel <tcit@tcit.fr> CS Signed-off-by: Thomas Citharel <tcit@tcit.fr> Move doctrine command path inside CI Signed-off-by: Thomas Citharel <tcit@tcit.fr> Move abstract migration class to correct namespace and remove unused command Signed-off-by: Thomas Citharel <tcit@tcit.fr> CS Signed-off-by: Thomas Citharel <tcit@tcit.fr> Check for legacy migration table existence Signed-off-by: Thomas Citharel <tcit@tcit.fr> Check if legacy migration table exists before deleting it Signed-off-by: Thomas Citharel <tcit@tcit.fr> Add messages for skipped migrations and fix an issue with MySQL ERR_NO_DATE Migration Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2018-04-18 16:16:22 +02:00
* @param Schema $schema
* @throws \Doctrine\DBAL\Schema\SchemaException
* @throws \Doctrine\DBAL\Migrations\SkipMigrationException
* @throws \Doctrine\DBAL\DBALException
Collecting Polled Users Emails Modification de la BDD : ajout de la colonne mail dans la table vote Modification de la BDD : ajout de la colonne mail dans la table vote (bis) MAJ de VoteRepository : méthode insert et update MAJ de PollService : méthodes updateVote, addVote et splitVotes Modification studs.php, adminstuds.php et vote_table_date.tpl : OK pour l'ajout d'un vote avec nom + mail Modification de vote_table_classic.tpl : OK pour l'ajout d'un vote avec nom + mail Ajout d'un bouton enveloppe pour chaque colonne avec méthode de traitement pour test Le numéro de la colonne est enfin récupéré correctement Implémentation récupération des adresses mails des sondés intéressants dans adminstuds.php et appel d'un fichier display_mails.tpl qui affichent ces adresses mails. Extension du traitement pour les sondages classic Ajout récupération des adresses des non aussi, et ajouts de tests pour l'affichage Changement des input type=text en type=email Corrections automatiques pour passage pipelines Corrections suite aux remarques sur la merge request Corrections 2 suite aux remarques sur la merge request Corrections 3 suite aux remarques sur la merge request Modif BDD : ajout colonne collect_mail dans poll Modif classes Form, PollRepository Passage de la collecte des mails des sondés en fonctionalité optionnelle Si la collecte de mail est activée, la saisie du mail est obligatoire Ajout avertissements collect_mail + editableByAll dans création de sondage et tableaux de vote Update create poll string and put a danger background on warning Signed-off-by: Thomas Citharel <tcit@tcit.fr> Translation strings updated and better position for the email public warning message Also, a CSS tweak and cleanup Signed-off-by: Thomas Citharel <tcit@tcit.fr> CS Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2018-03-18 10:40:38 +01:00
*/
Make Framadate compatible with PostgreSQL and great again ! * Move the database handling to Doctrine DBAL * Move Migrations to Doctrine Migrations * Rename migrations for Doctrine Migrations Uses * Fix Migrations * Change config parameters, introduce db name, host and port parameters and get rid of database url * Change install form for this * Add a CLI command to make migrations * Add config.test.php to be used with APP_ENV=test for testing Signed-off-by: Thomas Citharel <tcit@tcit.fr> CS Signed-off-by: Thomas Citharel <tcit@tcit.fr> Add sqlite to CI and execute migration in test env Signed-off-by: Thomas Citharel <tcit@tcit.fr> Typo Signed-off-by: Thomas Citharel <tcit@tcit.fr> SQLite is already inside the image... Signed-off-by: Thomas Citharel <tcit@tcit.fr> Rebase two new migrations Signed-off-by: Thomas Citharel <tcit@tcit.fr> Move from trait to abstract class and remove legacy migration table after checks Signed-off-by: Thomas Citharel <tcit@tcit.fr> CS Signed-off-by: Thomas Citharel <tcit@tcit.fr> Move doctrine command path inside CI Signed-off-by: Thomas Citharel <tcit@tcit.fr> Move abstract migration class to correct namespace and remove unused command Signed-off-by: Thomas Citharel <tcit@tcit.fr> CS Signed-off-by: Thomas Citharel <tcit@tcit.fr> Check for legacy migration table existence Signed-off-by: Thomas Citharel <tcit@tcit.fr> Check if legacy migration table exists before deleting it Signed-off-by: Thomas Citharel <tcit@tcit.fr> Add messages for skipped migrations and fix an issue with MySQL ERR_NO_DATE Migration Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2018-04-18 16:16:22 +02:00
public function up(Schema $schema)
{
$this->skipIf($this->legacyCheck($schema, 'Framadate\Migration\AddColumn_collect_mail_In_poll'), 'Migration has been executed in an earlier database migration system');
$vote = $schema->getTable(Utils::table('vote'));
$vote->addColumn('mail', 'string', ['default' => null, 'notnull' => false]);
Collecting Polled Users Emails Modification de la BDD : ajout de la colonne mail dans la table vote Modification de la BDD : ajout de la colonne mail dans la table vote (bis) MAJ de VoteRepository : méthode insert et update MAJ de PollService : méthodes updateVote, addVote et splitVotes Modification studs.php, adminstuds.php et vote_table_date.tpl : OK pour l'ajout d'un vote avec nom + mail Modification de vote_table_classic.tpl : OK pour l'ajout d'un vote avec nom + mail Ajout d'un bouton enveloppe pour chaque colonne avec méthode de traitement pour test Le numéro de la colonne est enfin récupéré correctement Implémentation récupération des adresses mails des sondés intéressants dans adminstuds.php et appel d'un fichier display_mails.tpl qui affichent ces adresses mails. Extension du traitement pour les sondages classic Ajout récupération des adresses des non aussi, et ajouts de tests pour l'affichage Changement des input type=text en type=email Corrections automatiques pour passage pipelines Corrections suite aux remarques sur la merge request Corrections 2 suite aux remarques sur la merge request Corrections 3 suite aux remarques sur la merge request Modif BDD : ajout colonne collect_mail dans poll Modif classes Form, PollRepository Passage de la collecte des mails des sondés en fonctionalité optionnelle Si la collecte de mail est activée, la saisie du mail est obligatoire Ajout avertissements collect_mail + editableByAll dans création de sondage et tableaux de vote Update create poll string and put a danger background on warning Signed-off-by: Thomas Citharel <tcit@tcit.fr> Translation strings updated and better position for the email public warning message Also, a CSS tweak and cleanup Signed-off-by: Thomas Citharel <tcit@tcit.fr> CS Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2018-03-18 10:40:38 +01:00
}
/**
Make Framadate compatible with PostgreSQL and great again ! * Move the database handling to Doctrine DBAL * Move Migrations to Doctrine Migrations * Rename migrations for Doctrine Migrations Uses * Fix Migrations * Change config parameters, introduce db name, host and port parameters and get rid of database url * Change install form for this * Add a CLI command to make migrations * Add config.test.php to be used with APP_ENV=test for testing Signed-off-by: Thomas Citharel <tcit@tcit.fr> CS Signed-off-by: Thomas Citharel <tcit@tcit.fr> Add sqlite to CI and execute migration in test env Signed-off-by: Thomas Citharel <tcit@tcit.fr> Typo Signed-off-by: Thomas Citharel <tcit@tcit.fr> SQLite is already inside the image... Signed-off-by: Thomas Citharel <tcit@tcit.fr> Rebase two new migrations Signed-off-by: Thomas Citharel <tcit@tcit.fr> Move from trait to abstract class and remove legacy migration table after checks Signed-off-by: Thomas Citharel <tcit@tcit.fr> CS Signed-off-by: Thomas Citharel <tcit@tcit.fr> Move doctrine command path inside CI Signed-off-by: Thomas Citharel <tcit@tcit.fr> Move abstract migration class to correct namespace and remove unused command Signed-off-by: Thomas Citharel <tcit@tcit.fr> CS Signed-off-by: Thomas Citharel <tcit@tcit.fr> Check for legacy migration table existence Signed-off-by: Thomas Citharel <tcit@tcit.fr> Check if legacy migration table exists before deleting it Signed-off-by: Thomas Citharel <tcit@tcit.fr> Add messages for skipped migrations and fix an issue with MySQL ERR_NO_DATE Migration Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2018-04-18 16:16:22 +02:00
* @param Schema $schema
* @throws \Doctrine\DBAL\Schema\SchemaException
Collecting Polled Users Emails Modification de la BDD : ajout de la colonne mail dans la table vote Modification de la BDD : ajout de la colonne mail dans la table vote (bis) MAJ de VoteRepository : méthode insert et update MAJ de PollService : méthodes updateVote, addVote et splitVotes Modification studs.php, adminstuds.php et vote_table_date.tpl : OK pour l'ajout d'un vote avec nom + mail Modification de vote_table_classic.tpl : OK pour l'ajout d'un vote avec nom + mail Ajout d'un bouton enveloppe pour chaque colonne avec méthode de traitement pour test Le numéro de la colonne est enfin récupéré correctement Implémentation récupération des adresses mails des sondés intéressants dans adminstuds.php et appel d'un fichier display_mails.tpl qui affichent ces adresses mails. Extension du traitement pour les sondages classic Ajout récupération des adresses des non aussi, et ajouts de tests pour l'affichage Changement des input type=text en type=email Corrections automatiques pour passage pipelines Corrections suite aux remarques sur la merge request Corrections 2 suite aux remarques sur la merge request Corrections 3 suite aux remarques sur la merge request Modif BDD : ajout colonne collect_mail dans poll Modif classes Form, PollRepository Passage de la collecte des mails des sondés en fonctionalité optionnelle Si la collecte de mail est activée, la saisie du mail est obligatoire Ajout avertissements collect_mail + editableByAll dans création de sondage et tableaux de vote Update create poll string and put a danger background on warning Signed-off-by: Thomas Citharel <tcit@tcit.fr> Translation strings updated and better position for the email public warning message Also, a CSS tweak and cleanup Signed-off-by: Thomas Citharel <tcit@tcit.fr> CS Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2018-03-18 10:40:38 +01:00
*/
Make Framadate compatible with PostgreSQL and great again ! * Move the database handling to Doctrine DBAL * Move Migrations to Doctrine Migrations * Rename migrations for Doctrine Migrations Uses * Fix Migrations * Change config parameters, introduce db name, host and port parameters and get rid of database url * Change install form for this * Add a CLI command to make migrations * Add config.test.php to be used with APP_ENV=test for testing Signed-off-by: Thomas Citharel <tcit@tcit.fr> CS Signed-off-by: Thomas Citharel <tcit@tcit.fr> Add sqlite to CI and execute migration in test env Signed-off-by: Thomas Citharel <tcit@tcit.fr> Typo Signed-off-by: Thomas Citharel <tcit@tcit.fr> SQLite is already inside the image... Signed-off-by: Thomas Citharel <tcit@tcit.fr> Rebase two new migrations Signed-off-by: Thomas Citharel <tcit@tcit.fr> Move from trait to abstract class and remove legacy migration table after checks Signed-off-by: Thomas Citharel <tcit@tcit.fr> CS Signed-off-by: Thomas Citharel <tcit@tcit.fr> Move doctrine command path inside CI Signed-off-by: Thomas Citharel <tcit@tcit.fr> Move abstract migration class to correct namespace and remove unused command Signed-off-by: Thomas Citharel <tcit@tcit.fr> CS Signed-off-by: Thomas Citharel <tcit@tcit.fr> Check for legacy migration table existence Signed-off-by: Thomas Citharel <tcit@tcit.fr> Check if legacy migration table exists before deleting it Signed-off-by: Thomas Citharel <tcit@tcit.fr> Add messages for skipped migrations and fix an issue with MySQL ERR_NO_DATE Migration Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2018-04-18 16:16:22 +02:00
public function down(Schema $schema)
{
$vote = $schema->getTable(Utils::table('vote'));
$vote->dropColumn('mail');
Collecting Polled Users Emails Modification de la BDD : ajout de la colonne mail dans la table vote Modification de la BDD : ajout de la colonne mail dans la table vote (bis) MAJ de VoteRepository : méthode insert et update MAJ de PollService : méthodes updateVote, addVote et splitVotes Modification studs.php, adminstuds.php et vote_table_date.tpl : OK pour l'ajout d'un vote avec nom + mail Modification de vote_table_classic.tpl : OK pour l'ajout d'un vote avec nom + mail Ajout d'un bouton enveloppe pour chaque colonne avec méthode de traitement pour test Le numéro de la colonne est enfin récupéré correctement Implémentation récupération des adresses mails des sondés intéressants dans adminstuds.php et appel d'un fichier display_mails.tpl qui affichent ces adresses mails. Extension du traitement pour les sondages classic Ajout récupération des adresses des non aussi, et ajouts de tests pour l'affichage Changement des input type=text en type=email Corrections automatiques pour passage pipelines Corrections suite aux remarques sur la merge request Corrections 2 suite aux remarques sur la merge request Corrections 3 suite aux remarques sur la merge request Modif BDD : ajout colonne collect_mail dans poll Modif classes Form, PollRepository Passage de la collecte des mails des sondés en fonctionalité optionnelle Si la collecte de mail est activée, la saisie du mail est obligatoire Ajout avertissements collect_mail + editableByAll dans création de sondage et tableaux de vote Update create poll string and put a danger background on warning Signed-off-by: Thomas Citharel <tcit@tcit.fr> Translation strings updated and better position for the email public warning message Also, a CSS tweak and cleanup Signed-off-by: Thomas Citharel <tcit@tcit.fr> CS Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2018-03-18 10:40:38 +01:00
}
}