Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

migrations:diff always creates Version file #104

Closed
derlarsen opened this Issue · 1 comment

2 participants

@derlarsen

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,
    Doctrine\DBAL\Schema\Schema;

/**
 * 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)

@stof
Collaborator

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.