<?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 Version20220809221801 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 founding_notification (id INT AUTO_INCREMENT NOT NULL, establishment_id INT NOT NULL, school_year_id INT NOT NULL, create_date DATE NOT NULL COMMENT \'(DC2Type:date_immutable)\', ip_address VARCHAR(128) NOT NULL, username VARCHAR(128) NOT NULL, action VARCHAR(128) NOT NULL, element VARCHAR(128) NOT NULL, description LONGTEXT NOT NULL, created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', created_by INT NOT NULL, updated_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', updated_by INT NOT NULL, INDEX IDX_77D8070B8565851 (establishment_id), INDEX IDX_77D8070BD2EECC3F (school_year_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE founding_notification ADD CONSTRAINT FK_77D8070B8565851 FOREIGN KEY (establishment_id) REFERENCES establishment (id)');
$this->addSql('ALTER TABLE founding_notification ADD CONSTRAINT FK_77D8070BD2EECC3F FOREIGN KEY (school_year_id) REFERENCES school_year (id)');
$this->addSql('ALTER TABLE establishment ADD sms_bank_payment VARCHAR(128) DEFAULT NULL');
$this->addSql('ALTER TABLE user ADD is_can_aproved_expense TINYINT(1) NOT NULL');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE founding_notification');
$this->addSql('ALTER TABLE establishment DROP sms_bank_payment');
$this->addSql('ALTER TABLE user DROP is_can_aproved_expense');
}
}