Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


migrations:diff always creates Version file #104

derlarsen opened this Issue · 1 comment

2 participants


Using the following command

./doctrine migrations:diff

does always create a version file even if there are no changes to be made to the current schema.

The content of this file is for example

namespace Application\Migrations;

use Doctrine\DBAL\Migrations\AbstractMigration,

 * Auto-generated Migration: Please modify to your need!
class Version20121210110653 extends AbstractMigration
    public function up(Schema $schema)
        // this up() migration is autogenerated, please modify it to your needs
        $this->abortIf($this->connection->getDatabasePlatform()->getName() != "mysql");


    public function down(Schema $schema)
        // this down() migration is autogenerated, please modify it to your needs
        $this->abortIf($this->connection->getDatabasePlatform()->getName() != "mysql");


In Doctrine\DBAL\Migrations\Tools\Console\Command\DiffCommand there is always the 'abortIf()' line added to the Version-Code.

As we want to use Migrations in a semi automatic build process these 'empty' versions are really annoying.

(Kind of duplicates #41)


Fixed by #160

@stof stof closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.