Skip to content

Commit

Permalink
Merge pull request #11 from bwaidelich/patch-1
Browse files Browse the repository at this point in the history
Allow doctrine migrations to be run on MySQL
  • Loading branch information
skurfuerst authored Sep 1, 2022
2 parents 7148e61 + 3853162 commit 02da4ab
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Migrations/Mysql/Version20220207105522.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ 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->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySqlPlatform,
"Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySqlPlatform'."
);

$this->addSql('CREATE TABLE sandstorm_neostwofactorauthentication_domain_model_secondfactor (persistence_object_identifier VARCHAR(40) NOT NULL, account VARCHAR(40) DEFAULT NULL, type INT NOT NULL, secret VARCHAR(255) NOT NULL, INDEX IDX_29EF8A7F7D3656A4 (account), PRIMARY KEY(persistence_object_identifier)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
Expand All @@ -33,8 +33,8 @@ 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->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySqlPlatform,
"Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySqlPlatform'."
);

$this->addSql('DROP TABLE sandstorm_neostwofactorauthentication_domain_model_secondfactor');
Expand Down

0 comments on commit 02da4ab

Please sign in to comment.