<?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 Version20211223135528 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 accompagnement (id INT AUTO_INCREMENT NOT NULL, titre VARCHAR(255) DEFAULT NULL, soustitre VARCHAR(255) DEFAULT NULL, image VARCHAR(255) DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE accompagnementsupport (id INT AUTO_INCREMENT NOT NULL, accompagnement_id INT DEFAULT NULL, contenu LONGTEXT DEFAULT NULL, INDEX IDX_16537DB8E768805 (accompagnement_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE offre (id INT AUTO_INCREMENT NOT NULL, titre VARCHAR(255) DEFAULT NULL, soustitre VARCHAR(255) DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE offredigital (id INT AUTO_INCREMENT NOT NULL, offre_id INT DEFAULT NULL, titre VARCHAR(255) DEFAULT NULL, image VARCHAR(255) DEFAULT NULL, INDEX IDX_55F1CA7F4CC8505A (offre_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE offredigitallearning (id INT AUTO_INCREMENT NOT NULL, offre_id INT DEFAULT NULL, titre VARCHAR(255) DEFAULT NULL, image VARCHAR(255) DEFAULT NULL, paragraphe LONGTEXT DEFAULT NULL, INDEX IDX_FC256D3C4CC8505A (offre_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE timsolution (id INT AUTO_INCREMENT NOT NULL, titre VARCHAR(255) DEFAULT NULL, soustitre VARCHAR(255) DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE timsolutionlms (id INT AUTO_INCREMENT NOT NULL, timsolution_id INT DEFAULT NULL, contenu LONGTEXT DEFAULT NULL, image VARCHAR(255) DEFAULT NULL, INDEX IDX_ABFDB3AC6A6FA8A6 (timsolution_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE accompagnementsupport ADD CONSTRAINT FK_16537DB8E768805 FOREIGN KEY (accompagnement_id) REFERENCES accompagnement (id)');
$this->addSql('ALTER TABLE offredigital ADD CONSTRAINT FK_55F1CA7F4CC8505A FOREIGN KEY (offre_id) REFERENCES offre (id)');
$this->addSql('ALTER TABLE offredigitallearning ADD CONSTRAINT FK_FC256D3C4CC8505A FOREIGN KEY (offre_id) REFERENCES offre (id)');
$this->addSql('ALTER TABLE timsolutionlms ADD CONSTRAINT FK_ABFDB3AC6A6FA8A6 FOREIGN KEY (timsolution_id) REFERENCES timsolution (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE accompagnementsupport DROP FOREIGN KEY FK_16537DB8E768805');
$this->addSql('ALTER TABLE offredigital DROP FOREIGN KEY FK_55F1CA7F4CC8505A');
$this->addSql('ALTER TABLE offredigitallearning DROP FOREIGN KEY FK_FC256D3C4CC8505A');
$this->addSql('ALTER TABLE timsolutionlms DROP FOREIGN KEY FK_ABFDB3AC6A6FA8A6');
$this->addSql('DROP TABLE accompagnement');
$this->addSql('DROP TABLE accompagnementsupport');
$this->addSql('DROP TABLE offre');
$this->addSql('DROP TABLE offredigital');
$this->addSql('DROP TABLE offredigitallearning');
$this->addSql('DROP TABLE timsolution');
$this->addSql('DROP TABLE timsolutionlms');
}
}