migrations:diff always creates Version file #104

derlarsen opened this Issue Dec 10, 2012 · 1 comment


None yet
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)

This comment has been minimized.

Show comment Hide comment

stof Aug 18, 2014


Fixed by #160


stof commented Aug 18, 2014

Fixed by #160

@stof stof closed this Aug 18, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment