Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #94 from kimhemsoe/donot_create_schema_onload

Do not create schema to see if the migrations table exists.
  • Loading branch information...
commit b38ddb190ec78d389b2c2de838b2a4d646ad1ce2 2 parents 3dd738b + 160d61e
Benjamin Eberlei beberlei authored
Showing with 5 additions and 6 deletions.
  1. +5 −6 lib/Doctrine/DBAL/Migrations/Configuration/Configuration.php
11 lib/Doctrine/DBAL/Migrations/Configuration/Configuration.php
View
@@ -62,7 +62,7 @@ class Configuration
/**
* OutputWriter instance for writing output during migrations
- *
+ *
* @var OutputWriter
*/
private $outputWriter;
@@ -76,7 +76,7 @@ class Configuration
/**
* The path to a directory where new migration classes will be written
- *
+ *
* @var string
*/
private $migrationsDirectory;
@@ -159,7 +159,7 @@ public function getOutputWriter()
/**
* Returns a timestamp version as a formatted date
*
- * @param string $version
+ * @param string $version
* @return string $formattedVersion The formatted version
*/
public function formatVersion($version)
@@ -207,7 +207,7 @@ public function getMigrationsTableName()
/**
* Set the new migrations directory where new migration classes are generated
*
- * @param string $migrationsDirectory The new migrations directory
+ * @param string $migrationsDirectory The new migrations directory
*/
public function setMigrationsDirectory($migrationsDirectory)
{
@@ -464,8 +464,7 @@ public function createMigrationTable()
return false;
}
- $schema = $this->connection->getSchemaManager()->createSchema();
- if ( ! $schema->hasTable($this->migrationsTableName)) {
+ if ( ! $this->connection->getSchemaManager()->tablesExist(array($this->migrationsTableName))) {
$columns = array(
'version' => new Column('version', Type::getType('string'), array('length' => 255)),
);
Please sign in to comment.
Something went wrong with that request. Please try again.