Issues (21)

Migration/Version20200323102013.php (1 issue)

Labels
Severity
1
<?php
2
declare(strict_types=1);
3
4
namespace GeodisBundle\Migrations;
5
6
use Doctrine\DBAL\Schema\Schema;
7
use Doctrine\Migrations\AbstractMigration;
8
9
/**
10
 * Auto-generated Migration: Please modify to your needs!
11
 */
12
class Version20200323102013 extends AbstractMigration
13
{
14
    /**
15
     * @param Schema $schema
16
     */
17
    public function up(Schema $schema)
18
    {
19
        // this up() migration is auto-generated, please modify it to your needs
20
        $this->abortIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\'.');
0 ignored issues
show
The method getName() does not exist on Doctrine\DBAL\Platforms\AbstractPlatform. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

20
        $this->abortIf('mysql' !== $this->connection->getDatabasePlatform()->/** @scrutinizer ignore-call */ getName(), 'Migration can only be executed safely on \'mysql\'.');

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
21
22
        $this->addSql('CREATE TABLE export_geodis_log (id INT AUTO_INCREMENT NOT NULL, code LONGTEXT NOT NULL, message LONGTEXT NOT NULL, called LONGTEXT NOT NULL, occured LONGTEXT NOT NULL, created_at DATETIME NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB');
23
    }
24
25
    /**
26
     * @param Schema $schema
27
     */
28
    public function down(Schema $schema)
29
    {
30
        // this down() migration is auto-generated, please modify it to your needs
31
        $this->abortIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\'.');
32
33
        $this->addSql('DROP TABLE export_geodis_log');
34
    }
35
}
36