Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Migrations diff command, creates a new file if you do not find differences #41

Closed
SongoQ opened this Issue Aug 3, 2011 · 2 comments

Comments

Projects
None yet
3 participants

SongoQ commented Aug 3, 2011

Execute the command migrations diff in the case where is no changes creates a new file

./app/console doctrine:migrations:diff

Generated new migration class to "/home/songoq/project/app/DoctrineMigrations/Version20110803142018.php" from schema differences.
cat /home/songoq/project/app/DoctrineMigrations/Version20110803142018.php

...
...
... 

class Version20110803142018 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");

    }
}

lenar commented Aug 3, 2011

Actually I can see the current behavior being useful. But... I propose this:

  • if no actual difference found say "No difference found."
  • If --always etc is passed then current behavior.
Member

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