diff --git a/Command/DiffFileCommand.php b/Command/DiffFileCommand.php index b0251c3..9888a85 100644 --- a/Command/DiffFileCommand.php +++ b/Command/DiffFileCommand.php @@ -7,6 +7,7 @@ use Doctrine\DBAL\Types\Type; use Doctrine\Migrations\Generator\DiffGenerator; use Doctrine\Migrations\Generator\Exception\NoChangesDetected; +use Doctrine\Migrations\Provider\EmptySchemaProvider; use Doctrine\Migrations\Provider\SchemaProviderInterface; use Doctrine\Migrations\Tools\Console\Helper\MigrationDirectoryHelper; use Symfony\Component\Console\Input\InputInterface; @@ -82,7 +83,8 @@ protected function createMigrationDiffGenerator() : DiffGenerator $this->getSchemaProvider(), $this->connection->getDatabasePlatform(), $this->dependencyFactory->getMigrationGenerator(), - $this->dependencyFactory->getMigrationSqlGenerator() + $this->dependencyFactory->getMigrationSqlGenerator(), + new EmptySchemaProvider($this->schemaManager) ); } diff --git a/composer.json b/composer.json index d02558c..3009b0f 100644 --- a/composer.json +++ b/composer.json @@ -9,6 +9,7 @@ "require": { "php": ">=7.1", "symfony/framework-bundle": "~3.4|~4.0|~5.0", - "doctrine/doctrine-migrations-bundle": "~2.0" + "doctrine/doctrine-migrations-bundle": "^2.0", + "doctrine/migrations": "^2.3" } }