<?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 Version20220511003728 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 xls_importation (id INT AUTO_INCREMENT NOT NULL, establishment_id INT NOT NULL, path VARCHAR(255) NOT NULL, created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', updated_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', created_by INT NOT NULL, updated_by INT NOT NULL, INDEX IDX_A335A43B8565851 (establishment_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE xls_importation ADD CONSTRAINT FK_A335A43B8565851 FOREIGN KEY (establishment_id) REFERENCES establishment (id)');
$this->addSql('ALTER TABLE establishment ADD sms_sender VARCHAR(128) NOT NULL, ADD sms_login VARCHAR(128) NOT NULL, ADD sms_password VARCHAR(128) NOT NULL');
$this->addSql('ALTER TABLE school_absence_and_delay CHANGE situation situation VARCHAR(255) NOT NULL, CHANGE duration_type duration_type VARCHAR(255) NOT NULL');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE xls_importation');
$this->addSql('ALTER TABLE establishment DROP sms_sender, DROP sms_login, DROP sms_password');
$this->addSql('ALTER TABLE school_absence_and_delay CHANGE situation situation VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE duration_type duration_type VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`');
}
}