for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* @package Mautic
* @copyright 2019 Mautic Contributors. All rights reserved.
* @author Mautic
* @link http://mautic.org
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
*/
namespace Mautic\Migrations;
use Doctrine\DBAL\Migrations\SkipMigrationException;
use Doctrine\DBAL\Schema\Schema;
use Mautic\CoreBundle\Doctrine\AbstractMauticMigration;
/**
* Auto-generated Migration: Please modify to your needs!
class Version20190715065013 extends AbstractMauticMigration
{
* @param Schema $schema
*
* @throws SkipMigrationException
* @throws \Doctrine\DBAL\Schema\SchemaException
public function preUp(Schema $schema)
$table = $schema->getTable($this->prefix.'forms');
if ($table->hasColumn('form_attr')) {
throw new SkipMigrationException('Schema includes this migration');
}
public function up(Schema $schema)
$this->addSql('ALTER TABLE '.$this->prefix.'forms ADD form_attr VARCHAR(255) DEFAULT NULL');