Skip to content

Commit

Permalink
This provides an option to use one transaction per fixture file
Browse files Browse the repository at this point in the history
  • Loading branch information
gnat42 committed Jan 29, 2014
1 parent 42ac886 commit 31ddf1b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Command/LoadDataFixturesDoctrineCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ protected function configure()
->addOption('append', null, InputOption::VALUE_NONE, 'Append the data fixtures instead of deleting all data from the database first.')
->addOption('em', null, InputOption::VALUE_REQUIRED, 'The entity manager to use for this command.')
->addOption('purge-with-truncate', null, InputOption::VALUE_NONE, 'Purge data by using a database-level TRUNCATE statement')
->addOption('multiple-transactions', null, InputOption::VALUE_NONE, 'Use one transaction per fixture file instead of a single transaction for all')
->setHelp(<<<EOT
The <info>doctrine:fixtures:load</info> command loads data fixtures from your bundles:
Expand Down Expand Up @@ -103,6 +104,6 @@ protected function execute(InputInterface $input, OutputInterface $output)
$executor->setLogger(function($message) use ($output) {
$output->writeln(sprintf(' <comment>></comment> <info>%s</info>', $message));
});
$executor->execute($fixtures, $input->getOption('append'));
$executor->execute($fixtures, $input->getOption('append'),$input->getOption('multiple-transactions'));
}
}

0 comments on commit 31ddf1b

Please sign in to comment.