Skip to content

Commit

Permalink
BUGFIX: Let Doctrine Migration also run with MySQL
Browse files Browse the repository at this point in the history
  • Loading branch information
sbruggmann committed Nov 29, 2023
1 parent c204a33 commit af230e0
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions Migrations/Mysql/Version20231009083822.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,11 @@ public function getDescription(): string

public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->abortIf(
!$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MariaDb1027Platform,
"Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MariaDb1027Platform'."
);

$this->addSql('CREATE TABLE jvmtech_anonymizer_domain_model_anonymizationstatus (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(255) NOT NULL, fromdatetime DATETIME DEFAULT NULL, todatetime DATETIME NOT NULL, executeddatetime DATETIME NOT NULL, anonymizedrecords INT NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
}

public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->abortIf(
!$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MariaDb1027Platform,
"Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MariaDb1027Platform'."
);

$this->addSql('DROP TABLE jvmtech_anonymizer_domain_model_anonymizationstatus');
}
}

0 comments on commit af230e0

Please sign in to comment.