Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

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
Closed

Comments

@SongoQ
Copy link

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
Copy link

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.

@stof
Copy link
Member

stof commented Aug 18, 2014

Fixed by #160

@stof stof closed this as completed Aug 18, 2014
sserbin pushed a commit to sserbin/migrations that referenced this issue Dec 27, 2022
By removing the `=` sign the `--dry-run` flag will always invoke a dry run and thus you don't need to explicitly set it to `true`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants