Permalink
Browse files

Fix migration commands

  • Loading branch information...
1 parent adddfb8 commit 86df4edc4f6c5c5457f1d801d25cf74183d8fa0a @cristianoc72 cristianoc72 committed Oct 20, 2012
@@ -16,6 +16,7 @@
use Symfony\Component\Console\Output\Output;
use Propel\Generator\Config\GeneratorConfig;
use Propel\Generator\Manager\MigrationManager;
+use Propel\Generator\Util\SqlParser;
/**
* @author William Durand <william.durand1@gmail.com>
@@ -102,7 +103,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
));
}
- $pdo = $manager->getPdoConnection($datasource);
+ $conn = $manager->getAdapterConnection($datasource);
$res = 0;
$statements = SqlParser::parseString($sql);
@@ -112,7 +113,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
$output->writeln(sprintf('Executing statement "%s"', $statement));
}
- $stmt = $pdo->prepare($statement);
+ $stmt = $conn->prepare($statement);
$stmt->execute();
$res++;
} catch (PDOException $e) {
@@ -16,6 +16,7 @@
use Symfony\Component\Console\Output\Output;
use Propel\Generator\Config\GeneratorConfig;
use Propel\Generator\Manager\MigrationManager;
+use Propel\Generator\Util\SqlParser;
/**
* @author William Durand <william.durand1@gmail.com>
@@ -94,7 +95,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
));
}
- $pdo = $manager->getPdoConnection($datasource);
+ $conn = $manager->getAdapterConnection($datasource);
$res = 0;
$statements = SqlParser::parseString($sql);
foreach ($statements as $statement) {
@@ -103,7 +104,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
$output->writeln(sprintf('Executing statement "%s"', $statement));
}
- $stmt = $pdo->prepare($statement);
+ $stmt = $conn->prepare($statement);
$stmt->execute();
$res++;
} catch (PDOException $e) {

0 comments on commit 86df4ed

Please sign in to comment.