<?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 Version20230506202835 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('CREATE TABLE conditions_generales (id INT AUTO_INCREMENT NOT NULL, titre1 VARCHAR(255) DEFAULT NULL, contenu1 LONGTEXT DEFAULT NULL, titre2 VARCHAR(255) DEFAULT NULL, contenu2 LONGTEXT DEFAULT NULL, titre3 VARCHAR(255) DEFAULT NULL, contenu3 LONGTEXT DEFAULT NULL, case1 INT DEFAULT NULL, case2 INT DEFAULT NULL, case3 INT DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE config_header (id INT AUTO_INCREMENT NOT NULL, contenu LONGTEXT DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE config_logo (id INT AUTO_INCREMENT NOT NULL, logo VARCHAR(255) DEFAULT NULL, dir VARCHAR(255) DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE config_smtp (id INT AUTO_INCREMENT NOT NULL, host VARCHAR(255) DEFAULT NULL, port VARCHAR(255) DEFAULT NULL, type_connexion VARCHAR(255) DEFAULT NULL, mdp VARCHAR(255) DEFAULT NULL, email1 VARCHAR(255) DEFAULT NULL, email2 VARCHAR(255) DEFAULT NULL, user VARCHAR(255) DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('DROP TABLE configuration');
$this->addSql('DROP TABLE connexion');
$this->addSql('DROP TABLE test');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE TABLE configuration (id INT AUTO_INCREMENT NOT NULL, header LONGTEXT CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, logo VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, description LONGTEXT CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('CREATE TABLE connexion (id INT AUTO_INCREMENT NOT NULL, adresse_ip VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, date_connexion DATETIME DEFAULT NULL, email VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, etat VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('CREATE TABLE test (id INT AUTO_INCREMENT NOT NULL, test VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('DROP TABLE conditions_generales');
$this->addSql('DROP TABLE config_header');
$this->addSql('DROP TABLE config_logo');
$this->addSql('DROP TABLE config_smtp');
}
}