for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php declare(strict_types = 1);
namespace App\Migrations;
use Doctrine\DBAL\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema;
/**
* Auto-generated Migration: Please modify to your needs!
*/
class Version20180513171521 extends AbstractMigration
Doctrine\DBAL\Migrations\AbstractMigration
If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated annotation
ignore-deprecated
class Version20180513171521 extends /** @scrutinizer ignore-deprecated */ AbstractMigration
{
public function up(Schema $schema)
// this up() migration is auto-generated, please modify it to your needs
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
$this->addSql('ALTER TABLE news ADD data LONGTEXT NOT NULL COMMENT \'(DC2Type:array)\', DROP title');
}
public function down(Schema $schema)
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE news ADD title VARCHAR(255) NOT NULL COLLATE utf8_unicode_ci, DROP data');