1
0
mirror of synced 2024-12-12 22:36:02 +03:00

[2.0] DDC-312 - Revert annoying View and Trigger variables in Schema instance, complete "View" support by just returning a View instance

This commit is contained in:
beberlei 2010-02-25 22:05:23 +00:00
parent 946fa6d7ca
commit 3e96788438
5 changed files with 9 additions and 9 deletions

View File

@ -755,7 +755,7 @@ abstract class AbstractSchemaManager
}
$tables = $this->listTables();
return new Schema($tables, $sequences, array(), array(), $this->createSchemaConfig());
return new Schema($tables, $sequences, $this->createSchemaConfig());
}
/**

View File

@ -58,7 +58,7 @@ class Schema extends AbstractAsset
* @param array $triggers
* @param SchemaConfig $schemaConfig
*/
public function __construct(array $tables=array(), array $sequences=array(), array $views = array(), array $triggers = array(), SchemaConfig $schemaConfig=null)
public function __construct(array $tables=array(), array $sequences=array(), SchemaConfig $schemaConfig=null)
{
if ($schemaConfig == null) {
$schemaConfig = new SchemaConfig();

View File

@ -114,7 +114,7 @@ class SchemaTool
$metadataSchemaConfig->setMaxIdentifierLength(63);
$sm = $this->_em->getConnection()->getSchemaManager();
$schema = new \Doctrine\DBAL\Schema\Schema(array(), array(), array(), array(), $metadataSchemaConfig);
$schema = new \Doctrine\DBAL\Schema\Schema(array(), array(), $metadataSchemaConfig);
foreach ($classes as $class) {
if (isset($processedClasses[$class->name]) || $class->isMappedSuperclass) {

View File

@ -91,8 +91,8 @@ class ComparatorTest extends \PHPUnit_Framework_TestCase
$table = new Table('bugdb', array ('integerfield1' => new Column('integerfield1', Type::getType('integer'))));
$table->setSchemaConfig($schemaConfig);
$schema1 = new Schema( array($table), array(), array(), array(), $schemaConfig );
$schema2 = new Schema( array(), array(), array(), array(), $schemaConfig );
$schema1 = new Schema( array($table), array(), $schemaConfig );
$schema2 = new Schema( array(), array(), $schemaConfig );
$expected = new SchemaDiff( array(), array(), array('bugdb' => $table) );
@ -105,8 +105,8 @@ class ComparatorTest extends \PHPUnit_Framework_TestCase
$table = new Table('bugdb', array ('integerfield1' => new Column('integerfield1', Type::getType('integer'))));
$table->setSchemaConfig($schemaConfig);
$schema1 = new Schema( array(), array(), array(), array(), $schemaConfig );
$schema2 = new Schema( array($table), array(), array(), array(), $schemaConfig );
$schema1 = new Schema( array(), array(), $schemaConfig );
$schema2 = new Schema( array($table), array(), $schemaConfig );
$expected = new SchemaDiff( array('bugdb' => $table), array(), array() );
$this->assertEquals($expected, Comparator::compareSchemas( $schema1, $schema2 ) );

View File

@ -193,7 +193,7 @@ class SchemaTest extends \PHPUnit_Framework_TestCase
$schemaConfig = new \Doctrine\DBAL\Schema\SchemaConfig();
$schemaConfig->setExplicitForeignKeyIndexes(false);
$schema = new Schema(array(), array(), array(), array(), $schemaConfig);
$schema = new Schema(array(), array(), $schemaConfig);
$this->assertFalse($schema->hasExplicitForeignKeyIndexes());
$schemaConfig->setExplicitForeignKeyIndexes(true);
@ -205,7 +205,7 @@ class SchemaTest extends \PHPUnit_Framework_TestCase
$schemaConfig = new \Doctrine\DBAL\Schema\SchemaConfig();
$schemaConfig->setMaxIdentifierLength(10);
$schema = new Schema(array(), array(), array(), array(), $schemaConfig);
$schema = new Schema(array(), array(), $schemaConfig);
$table = $schema->createTable("smalltable");
$table->addColumn('long_id', 'integer');
$table->addIndex(array('long_id'));