<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20221128101204 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE ec_contact');
$this->addSql('DROP TABLE ec_fiche');
$this->addSql('DROP TABLE ec_lieu');
$this->addSql('DROP TABLE ecj_fiche_commercial');
$this->addSql('DROP TABLE ecj_fiche_dispositif');
$this->addSql('DROP TABLE ecj_fiche_domaine');
$this->addSql('DROP TABLE ecj_fiche_mots_clef');
$this->addSql('DROP TABLE ecj_fiche_referent');
$this->addSql('DROP TABLE ecj_fiche_sous_domaine');
$this->addSql('DROP TABLE sales_training_sheet');
$this->addSql('DROP TABLE sales_ts_commercial');
$this->addSql('DROP TABLE sales_ts_dispositif');
$this->addSql('DROP TABLE sales_ts_domaine');
$this->addSql('DROP TABLE sales_ts_referent');
$this->addSql('DROP TABLE sales_ts_sous_domaine');
$this->addSql('DROP TABLE utilisateur');
$this->addSql('ALTER TABLE certification_type CHANGE id id INT AUTO_INCREMENT NOT NULL');
$this->addSql('ALTER TABLE domain CHANGE id id INT AUTO_INCREMENT NOT NULL');
$this->addSql('ALTER TABLE keywords CHANGE id id INT AUTO_INCREMENT NOT NULL');
$this->addSql('ALTER TABLE sub_domain CHANGE id id INT AUTO_INCREMENT NOT NULL');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE TABLE ec_contact (id_contact INT AUTO_INCREMENT NOT NULL, nom VARCHAR(255) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, prenom VARCHAR(255) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, mail VARCHAR(255) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, tel_fixe VARCHAR(255) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, tel_mobile VARCHAR(255) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, PRIMARY KEY(id_contact)) DEFAULT CHARACTER SET latin1 COLLATE `latin1_swedish_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('CREATE TABLE ec_fiche (id_fiche INT AUTO_INCREMENT NOT NULL, titre VARCHAR(255) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, sous_titre VARCHAR(255) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, code VARCHAR(255) CHARACTER SET latin1 DEFAULT NULL COLLATE `latin1_swedish_ci`, dphoto VARCHAR(255) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, les_plus TEXT CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, ordre VARCHAR(255) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, type TINYINT(1) NOT NULL, libeller_type VARCHAR(255) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, duree VARCHAR(255) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, fonction_visee TEXT CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, personne_concernee TEXT CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, poursuite_etude TEXT CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, rythme_alternance TEXT CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, prerequis TEXT CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, objectif TEXT CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, objectif_complementaire TEXT CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, methode_pedagogique TEXT CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, moyen_pedagogique TEXT CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, id_lieu INT NOT NULL, date_formation VARCHAR(50) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, id_personnalisable INT NOT NULL, contenu_pedagogique TEXT CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, id_certification INT NOT NULL, niveau_formation VARCHAR(255) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, ordre_niveau_formation VARCHAR(255) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, denomination_certification VARCHAR(255) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, prix VARCHAR(255) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, temoignages TEXT CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, date_creation BIGINT DEFAULT NULL, date_update BIGINT DEFAULT NULL, date_en_ligne BIGINT DEFAULT NULL, nouveau TINYINT(1) NOT NULL, en_ligne TINYINT(1) DEFAULT 1 NOT NULL, access_modalities TEXT CHARACTER SET latin1 DEFAULT NULL COLLATE `latin1_swedish_ci`, eval_modalities TEXT CHARACTER SET latin1 DEFAULT NULL COLLATE `latin1_swedish_ci`, accessibility INT DEFAULT 0, text_accessibility TEXT CHARACTER SET latin1 DEFAULT NULL COLLATE `latin1_swedish_ci`, certif_is_blocks TINYINT(1) DEFAULT 0 NOT NULL, FULLTEXT INDEX contenu_pedagogique (contenu_pedagogique), FULLTEXT INDEX text_accessibility (text_accessibility), PRIMARY KEY(id_fiche)) DEFAULT CHARACTER SET latin1 COLLATE `latin1_swedish_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('CREATE TABLE ec_lieu (id_lieu INT AUTO_INCREMENT NOT NULL, label VARCHAR(255) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, PRIMARY KEY(id_lieu)) DEFAULT CHARACTER SET latin1 COLLATE `latin1_swedish_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('CREATE TABLE ecj_fiche_commercial (id_fiche_commercial INT AUTO_INCREMENT NOT NULL, id_fiche INT NOT NULL, id_contact INT NOT NULL, INDEX id_fiche (id_fiche, id_contact), PRIMARY KEY(id_fiche_commercial)) DEFAULT CHARACTER SET latin1 COLLATE `latin1_swedish_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('CREATE TABLE ecj_fiche_dispositif (id_fiche_dispositif INT AUTO_INCREMENT NOT NULL, id_fiche INT NOT NULL, id_dispositif INT NOT NULL, INDEX id_fiche (id_fiche, id_dispositif), PRIMARY KEY(id_fiche_dispositif)) DEFAULT CHARACTER SET latin1 COLLATE `latin1_swedish_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('CREATE TABLE ecj_fiche_domaine (id_fiche_domaine INT AUTO_INCREMENT NOT NULL, id_fiche INT NOT NULL, id_domaine INT NOT NULL, INDEX id_fiche (id_fiche, id_domaine), PRIMARY KEY(id_fiche_domaine)) DEFAULT CHARACTER SET latin1 COLLATE `latin1_swedish_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('CREATE TABLE ecj_fiche_mots_clef (id_fiche_mots_clef INT AUTO_INCREMENT NOT NULL, id_fiche INT NOT NULL, id_mots_clef INT NOT NULL, INDEX id_fiche (id_fiche, id_mots_clef), PRIMARY KEY(id_fiche_mots_clef)) DEFAULT CHARACTER SET latin1 COLLATE `latin1_swedish_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('CREATE TABLE ecj_fiche_referent (id_fiche_referent INT AUTO_INCREMENT NOT NULL, id_fiche INT NOT NULL, id_contact INT NOT NULL, INDEX id_fiche (id_fiche, id_contact), PRIMARY KEY(id_fiche_referent)) DEFAULT CHARACTER SET latin1 COLLATE `latin1_swedish_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('CREATE TABLE ecj_fiche_sous_domaine (id_fiche_sous_domaine INT AUTO_INCREMENT NOT NULL, id_fiche INT NOT NULL, id_sous_domaine INT DEFAULT 0 NOT NULL, INDEX id_fiche (id_fiche, id_sous_domaine), PRIMARY KEY(id_fiche_sous_domaine)) DEFAULT CHARACTER SET latin1 COLLATE `latin1_swedish_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('CREATE TABLE sales_training_sheet (id_training_sheet INT AUTO_INCREMENT NOT NULL, id_formation INT NOT NULL, titre VARCHAR(150) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, date_created TEXT CHARACTER SET latin1 DEFAULT NULL COLLATE `latin1_swedish_ci`, date_modify DATE DEFAULT NULL, titre_formation VARCHAR(255) CHARACTER SET latin1 DEFAULT NULL COLLATE `latin1_swedish_ci`, sous_titre VARCHAR(255) CHARACTER SET latin1 DEFAULT NULL COLLATE `latin1_swedish_ci`, code VARCHAR(255) CHARACTER SET latin1 DEFAULT NULL COLLATE `latin1_swedish_ci`, id_personnalisable INT DEFAULT NULL, type TINYINT(1) DEFAULT NULL, duree VARCHAR(255) CHARACTER SET latin1 DEFAULT NULL COLLATE `latin1_swedish_ci`, fonction_visee TEXT CHARACTER SET latin1 DEFAULT NULL COLLATE `latin1_swedish_ci`, personne_concernee TEXT CHARACTER SET latin1 DEFAULT NULL COLLATE `latin1_swedish_ci`, poursuite_etude TEXT CHARACTER SET latin1 DEFAULT NULL COLLATE `latin1_swedish_ci`, rythme_alternance TEXT CHARACTER SET latin1 DEFAULT NULL COLLATE `latin1_swedish_ci`, prerequis TEXT CHARACTER SET latin1 DEFAULT NULL COLLATE `latin1_swedish_ci`, objectif TEXT CHARACTER SET latin1 DEFAULT NULL COLLATE `latin1_swedish_ci`, objectif_complementaire TEXT CHARACTER SET latin1 DEFAULT NULL COLLATE `latin1_swedish_ci`, methode_pedagogique TEXT CHARACTER SET latin1 DEFAULT NULL COLLATE `latin1_swedish_ci`, moyen_pedagogique TEXT CHARACTER SET latin1 DEFAULT NULL COLLATE `latin1_swedish_ci`, id_lieu VARCHAR(250) CHARACTER SET latin1 DEFAULT NULL COLLATE `latin1_swedish_ci`, contenu_pedagogique TEXT CHARACTER SET latin1 DEFAULT NULL COLLATE `latin1_swedish_ci`, id_certification INT DEFAULT NULL, denomination_certification VARCHAR(255) CHARACTER SET latin1 DEFAULT NULL COLLATE `latin1_swedish_ci`, prix VARCHAR(255) CHARACTER SET latin1 DEFAULT NULL COLLATE `latin1_swedish_ci`, temoignages TEXT CHARACTER SET latin1 DEFAULT NULL COLLATE `latin1_swedish_ci`, certif_is_blocks TINYINT(1) DEFAULT NULL, access_modalities TEXT CHARACTER SET latin1 DEFAULT NULL COLLATE `latin1_swedish_ci`, eval_modalities TEXT CHARACTER SET latin1 DEFAULT NULL COLLATE `latin1_swedish_ci`, niveau_formation VARCHAR(255) CHARACTER SET latin1 DEFAULT NULL COLLATE `latin1_swedish_ci`, text_accessibility TEXT CHARACTER SET latin1 DEFAULT NULL COLLATE `latin1_swedish_ci`, accessibility INT DEFAULT 1, les_plus TEXT CHARACTER SET latin1 DEFAULT NULL COLLATE `latin1_swedish_ci`, INDEX titre_formation_2 (titre_formation), FULLTEXT INDEX titre_formation (titre_formation), PRIMARY KEY(id_training_sheet)) DEFAULT CHARACTER SET latin1 COLLATE `latin1_swedish_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('CREATE TABLE sales_ts_commercial (id_ts_commercial INT AUTO_INCREMENT NOT NULL, id_training_sheet INT NOT NULL, id_contact INT NOT NULL, PRIMARY KEY(id_ts_commercial)) DEFAULT CHARACTER SET latin1 COLLATE `latin1_swedish_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('CREATE TABLE sales_ts_dispositif (id_ts_dispositif INT AUTO_INCREMENT NOT NULL, id_training_sheet INT NOT NULL, id_dispositif INT NOT NULL, PRIMARY KEY(id_ts_dispositif)) DEFAULT CHARACTER SET latin1 COLLATE `latin1_swedish_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('CREATE TABLE sales_ts_domaine (id_ts_domaine INT AUTO_INCREMENT NOT NULL, id_training_sheet INT NOT NULL, id_domaine INT NOT NULL, PRIMARY KEY(id_ts_domaine)) DEFAULT CHARACTER SET latin1 COLLATE `latin1_swedish_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('CREATE TABLE sales_ts_referent (id_ts_referent INT AUTO_INCREMENT NOT NULL, id_training_sheet INT NOT NULL, id_contact INT NOT NULL, PRIMARY KEY(id_ts_referent)) DEFAULT CHARACTER SET latin1 COLLATE `latin1_swedish_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('CREATE TABLE sales_ts_sous_domaine (id_ts_sous_domaine INT AUTO_INCREMENT NOT NULL, id_training_sheet INT NOT NULL, id_sous_domaine INT NOT NULL, PRIMARY KEY(id_ts_sous_domaine)) DEFAULT CHARACTER SET latin1 COLLATE `latin1_swedish_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('CREATE TABLE utilisateur (id_utilisateur INT AUTO_INCREMENT NOT NULL, nom VARCHAR(50) CHARACTER SET utf8mb3 NOT NULL COLLATE `utf8mb3_general_ci`, prenom VARCHAR(50) CHARACTER SET utf8mb3 NOT NULL COLLATE `utf8mb3_general_ci`, email VARCHAR(50) CHARACTER SET utf8mb3 NOT NULL COLLATE `utf8mb3_general_ci`, pwd VARCHAR(50) CHARACTER SET utf8mb3 NOT NULL COLLATE `utf8mb3_general_ci`, telephone VARCHAR(50) CHARACTER SET utf8mb3 NOT NULL COLLATE `utf8mb3_general_ci`, droit TINYINT(1) DEFAULT 0 NOT NULL, PRIMARY KEY(id_utilisateur)) DEFAULT CHARACTER SET utf8mb3 COLLATE `utf8mb3_general_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('ALTER TABLE certification_type CHANGE id id INT NOT NULL');
$this->addSql('ALTER TABLE domain CHANGE id id INT NOT NULL');
$this->addSql('ALTER TABLE keywords CHANGE id id INT NOT NULL');
$this->addSql('ALTER TABLE sub_domain CHANGE id id INT NOT NULL');
}
}