diff --git a/src/Command/FixedExecuteCommand.php b/src/Command/FixedExecuteCommand.php new file mode 100644 index 0000000..cecd31d --- /dev/null +++ b/src/Command/FixedExecuteCommand.php @@ -0,0 +1,26 @@ +getArgument('version'); + assert(is_string($version)); + $this->configuration->getVersion($version); + + return parent::execute($input, $output); + } + +} diff --git a/src/DI/MigrationsExtension.php b/src/DI/MigrationsExtension.php index 7dc8cdf..b195f2c 100644 --- a/src/DI/MigrationsExtension.php +++ b/src/DI/MigrationsExtension.php @@ -3,7 +3,6 @@ namespace Nettrine\Migrations\DI; use Doctrine\Migrations\Tools\Console\Command\DiffCommand; -use Doctrine\Migrations\Tools\Console\Command\ExecuteCommand; use Doctrine\Migrations\Tools\Console\Command\GenerateCommand; use Doctrine\Migrations\Tools\Console\Command\LatestCommand; use Doctrine\Migrations\Tools\Console\Command\MigrateCommand; @@ -16,6 +15,7 @@ use Nette\DI\Definitions\Statement; use Nette\Schema\Expect; use Nette\Schema\Schema; +use Nettrine\Migrations\Command\FixedExecuteCommand; use Nettrine\Migrations\ContainerAwareConfiguration; use stdClass; use Symfony\Component\Console\Application; @@ -70,7 +70,7 @@ public function loadConfiguration(): void ->setAutowired(false) ->addTag('console.command', 'migrations:diff'); $builder->addDefinition($this->prefix('executeCommand')) - ->setFactory(ExecuteCommand::class) + ->setFactory(FixedExecuteCommand::class) ->setAutowired(false) ->addTag('console.command', 'migrations:execute'); $builder->addDefinition($this->prefix('generateCommand')) diff --git a/src/Events/FixPostgreSQLDefaultSchemaSubscriber.php b/src/Subscriber/FixPostgreSQLDefaultSchemaSubscriber.php similarity index 95% rename from src/Events/FixPostgreSQLDefaultSchemaSubscriber.php rename to src/Subscriber/FixPostgreSQLDefaultSchemaSubscriber.php index 27b97f8..07e7fce 100644 --- a/src/Events/FixPostgreSQLDefaultSchemaSubscriber.php +++ b/src/Subscriber/FixPostgreSQLDefaultSchemaSubscriber.php @@ -1,6 +1,6 @@