Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
robocoder committed May 5, 2014
1 parent f0ebcce commit d061d4e
Showing 1 changed file with 14 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
use Doctrine\DBAL\Driver\PDOSqlite\Driver as SqliteDriver;
use Doctrine\DBAL\Migrations\Configuration\Configuration;
use Doctrine\DBAL\Migrations\Migration;
use Doctrine\DBAL\Migrations\OutputWriter;
use Doctrine\ORM\Tools\SchemaTool;
use Symfony\Bridge\Doctrine\DataFixtures\ContainerAwareLoader as DataFixturesLoader;
use Symfony\Bundle\DoctrineFixturesBundle\Common\DataFixtures\Loader as SymfonyFixturesLoader;
Expand Down Expand Up @@ -309,11 +310,20 @@ private function loadFixtures()
*/
private function runMigrations()
{
$connection = $this->entityManager->getConnection();
$outputWriter = new OutputWriter(function () {});
$connection = $this->entityManager->getConnection();

/*
$outputWriter = new OutputWriter(function () {});
$configuration = new Configuration($connection, $outputWriter);
$migration = new Migration($configuration);
$sql = $migration->migration(null, false);
$configuration->setMigrationsNamespace();
$configuration->setMigrationsDirectory();
$configuration->setName();
$configuration->setMigrationsTableName();
$migration = new Migration($configuration);
$sql = $migration->migrate(null, false);
*/

foreach ($this->migrations as $migration) {
foreach (explode("\n", trim(file_get_contents($migration))) as $sql) {
Expand Down

0 comments on commit d061d4e

Please sign in to comment.