Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added option to skip SQL insertion of specific connections

  • Loading branch information...
commit c139e382767c5b34fd2889ee8f8e061a0a2c89b3 1 parent 07f963b
@willdurand willdurand authored
Showing with 8 additions and 1 deletion.
  1. +8 −1 lib/task/sfPropelInsertSqlTask.class.php
View
9 lib/task/sfPropelInsertSqlTask.class.php
@@ -100,7 +100,7 @@ protected function execute($arguments = array(), $options = array())
), 'QUESTION_LARGE', false)
)
{
- $this->cleanup();
+ $this->cleanup();
$this->logSection('propel', 'Task aborted.');
return 1;
@@ -111,6 +111,13 @@ protected function execute($arguments = array(), $options = array())
mkdir($this->tmpDir, 0777, true);
foreach ($sqls as $connection => $files)
{
+ $database = $databaseManager->getDatabase($connection);
+ if (false === $database->getParameter('insert_sql', true))
+ {
+ $this->logSection('propel', 'Skipped connection: ' . $connection, null, 'ERROR');
+ continue;
+ }
+
$dir = $this->tmpDir.'/'.$connection;
mkdir($dir, 0777, true);
Please sign in to comment.
Something went wrong with that request. Please try again.