mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-12-22 19:09:31 +00:00
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
|
|
@ -39,7 +39,7 @@ final class Version20190902140506 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\'.');
|
||||
|
||||
//Check if we can use this migration method:
|
||||
$version = $this->getOldDBVersion();
|
||||
|
|
@ -197,7 +197,7 @@ final class Version20190902140506 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 currencies DROP FOREIGN KEY FK_37C44693727ACA70');
|
||||
$this->addSql('ALTER TABLE `suppliers` DROP FOREIGN KEY FK_AC28B95CECD792C0');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue