Skip to content

Commit

Permalink
Update MigrationDiffCommand.php
Browse files Browse the repository at this point in the history
fix getting the excludes tables list from valid config when use command `php vendor\propel\propel\bin\propel.php migration:diff --config-dir=config/database`
  • Loading branch information
almost-online committed Mar 9, 2016
1 parent feef0fe commit ae20f91
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Propel/Generator/Command/MigrationDiffCommand.php
Expand Up @@ -166,6 +166,9 @@ protected function execute(InputInterface $input, OutputInterface $output)
$migrationsDown = [];
$removeTable = !$input->getOption('skip-removed-table');
$excludedTables = $input->getOption('skip-tables');
$configManager = new ConfigurationManager($input->getOption('config-dir'));
$excludedTables = array_merge((array) $excludedTables, (array) $configManager->getSection('exclude_tables'));

foreach ($reversedSchema->getDatabases() as $database) {
$name = $database->getName();

Expand All @@ -178,9 +181,6 @@ protected function execute(InputInterface $input, OutputInterface $output)
continue;
}

$configManager = new ConfigurationManager();
$excludedTables = array_merge((array) $excludedTables, (array) $configManager->getSection('exclude_tables'));

$databaseDiff = DatabaseComparator::computeDiff($database, $appDataDatabase, false, $tableRenaming, $removeTable, $excludedTables);

if (!$databaseDiff) {
Expand Down

0 comments on commit ae20f91

Please sign in to comment.