<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema;
/**
* Auto-generated Migration: Please modify to your needs!
*/
class Version20211005133510 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->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
$this->addSql('CREATE TABLE infos_formule_base (id INT AUTO_INCREMENT NOT NULL, residence_id INT DEFAULT NULL, lang_id INT DEFAULT NULL, service_inc LONGTEXT DEFAULT NULL, service_noinc LONGTEXT DEFAULT NULL, nom VARCHAR(255) DEFAULT NULL, picto VARCHAR(255) DEFAULT NULL, suffixe VARCHAR(255) DEFAULT NULL, INDEX IDX_7E7F60048B225FBD (residence_id), INDEX IDX_7E7F6004B213FA4 (lang_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB');
$this->addSql('ALTER TABLE infos_formule_base ADD presta_inc LONGTEXT DEFAULT NULL');
$this->addSql('ALTER TABLE infos_formule_base ADD presta_noinc LONGTEXT DEFAULT NULL');
$this->addSql('ALTER TABLE infos_formule_base ADD description LONGTEXT DEFAULT NULL');
$this->addSql('ALTER TABLE infos_formule_base ADD type VARCHAR (255) DEFAULT NULL');
$this->addSql('ALTER TABLE infos_formule_base ADD photo_profil VARCHAR (255) DEFAULT NULL');
$this->addSql('ALTER TABLE infos_formule_base ADD id_iresa INT DEFAULT 0');
$this->addSql('ALTER TABLE infos_formule_base ADD CONSTRAINT FK_7E7F60048B225FBD FOREIGN KEY (residence_id) REFERENCES residence (id)');
$this->addSql('ALTER TABLE infos_formule_base ADD CONSTRAINT FK_7E7F6004B213FA4 FOREIGN KEY (lang_id) REFERENCES language (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
$this->addSql('DROP TABLE infos_formule_base');
}
}