forked from mirror/Part-DB.Part-DB-server
Use non deprecated method to get database driver type.
This commit is contained in:
parent
61bd0bd15c
commit
d3b1108d45
10 changed files with 44 additions and 26 deletions
|
@ -20,7 +20,7 @@ final class Version20200409130946 extends AbstractMultiPlatformMigration
|
|||
public function mySQLUp(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->abortIf('mysql' !== $this->getDatabaseType(), 'Migration can only be executed safely on \'mysql\'.');
|
||||
|
||||
$this->addSql('ALTER TABLE u2f_keys CHANGE key_handle key_handle VARCHAR(128) NOT NULL');
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ final class Version20200409130946 extends AbstractMultiPlatformMigration
|
|||
public function mySQLDown(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->abortIf('mysql' !== $this->getDatabaseType(), 'Migration can only be executed safely on \'mysql\'.');
|
||||
|
||||
$this->addSql('ALTER TABLE u2f_keys CHANGE key_handle key_handle VARCHAR(64) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`');
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue