<?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 Version20220411101519 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 appli_liste_update (id INT AUTO_INCREMENT NOT NULL, appli_versions_id INT DEFAULT NULL, intitule VARCHAR(255) NOT NULL, commentaires VARCHAR(255) NOT NULL, date_creation DATETIME NOT NULL, etat INT NOT NULL, INDEX IDX_D6B349079E04BEB (appli_versions_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE appli_versions (id INT AUTO_INCREMENT NOT NULL, num_version VARCHAR(255) NOT NULL, date_update DATETIME NOT NULL, observations VARCHAR(255) DEFAULT NULL, etat INT NOT NULL, date_creation DATETIME NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE appli_liste_update ADD CONSTRAINT FK_D6B349079E04BEB FOREIGN KEY (appli_versions_id) REFERENCES appli_versions (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE appli_liste_update DROP FOREIGN KEY FK_D6B349079E04BEB');
$this->addSql('DROP TABLE appli_liste_update');
$this->addSql('DROP TABLE appli_versions');
}
}