<?php
declare(strict_types=1);
namespace Application\Migrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20190409120924 extends AbstractMigration
{
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->abortIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\'.');
$this->addSql('CREATE TABLE alpha_update (id INT AUTO_INCREMENT NOT NULL, company_id INT DEFAULT NULL, contact_id INT DEFAULT NULL, xml_field VARCHAR(255) NOT NULL, property_path VARCHAR(255) NOT NULL, backup VARCHAR(255) NOT NULL, value VARCHAR(255) NOT NULL, decoded LONGBLOB NOT NULL, processed TINYINT(1) NOT NULL, created_at DATETIME NOT NULL COMMENT \'(DC2Type:carbondatetime)\', updated_at DATETIME NOT NULL COMMENT \'(DC2Type:carbondatetime)\', INDEX IDX_6325E973979B1AD6 (company_id), INDEX IDX_6325E973E7A1254A (contact_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE = InnoDB');
$this->addSql('ALTER TABLE alpha_update ADD CONSTRAINT FK_6325E973979B1AD6 FOREIGN KEY (company_id) REFERENCES non_member_billing_company (id)');
$this->addSql('ALTER TABLE alpha_update ADD CONSTRAINT FK_6325E973E7A1254A FOREIGN KEY (contact_id) REFERENCES non_member_billing_contact_person (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->abortIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\'.');
$this->addSql('DROP TABLE alpha_update');
}
}