Skip to content

Commit

Permalink
Removed identifier generator type from schema table definition
Browse files Browse the repository at this point in the history
  • Loading branch information
guilhermeblanco authored and morozov committed Jan 4, 2018
1 parent a4ecf05 commit d7d1c39
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion lib/Doctrine/DBAL/Platforms/SqlitePlatform.php
Original file line number Diff line number Diff line change
Expand Up @@ -875,7 +875,7 @@ public function getAlterTableSQL(TableDiff $diff)
if ( ! $this->onSchemaAlterTable($diff, $tableSql)) {
$dataTable = new Table('__temp__'.$table->getName());

$newTable = new Table($table->getQuotedName($this), $columns, $this->getPrimaryIndexInAlteredTable($diff), array(), $this->getForeignKeysInAlteredTable($diff), 0, $table->getOptions());
$newTable = new Table($table->getQuotedName($this), $columns, $this->getPrimaryIndexInAlteredTable($diff), array(), $this->getForeignKeysInAlteredTable($diff), $table->getOptions());
$newTable->addOption('alter', true);

$sql = $this->getPreAlterTableIndexForeignKeySQL($diff);
Expand Down
2 changes: 1 addition & 1 deletion lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ public function listTableDetails($tableName)

$indexes = $this->listTableIndexes($tableName);

return new Table($tableName, $columns, $indexes, [], $foreignKeys, false, []);
return new Table($tableName, $columns, $indexes, [], $foreignKeys, []);
}

/**
Expand Down
4 changes: 1 addition & 3 deletions lib/Doctrine/DBAL/Schema/Table.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ class Table extends AbstractAsset
* @param Index[] $indexes
* @param UniqueConstraint[] $uniqueConstraints
* @param ForeignKeyConstraint[] $fkConstraints
* @param integer $idGeneratorType
* @param array $options
*
* @throws DBALException
Expand All @@ -94,7 +93,6 @@ public function __construct(
array $indexes = [],
array $uniqueConstraints = [],
array $fkConstraints = [],
$idGeneratorType = 0,
array $options = []
)
{
Expand Down Expand Up @@ -839,7 +837,7 @@ protected function _getMaxIdentifierLength()
return ($this->_schemaConfig instanceof SchemaConfig)
? $this->_schemaConfig->getMaxIdentifierLength()
: 63
;
;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -887,7 +887,7 @@ protected function createTestTable($name = 'test_table', $data = array())

protected function getTestTable($name, $options=array())
{
$table = new Table($name, array(), array(), array(), array(), false, $options);
$table = new Table($name, array(), array(), array(), array(), $options);
$table->setSchemaConfig($this->_sm->createSchemaConfig());
$table->addColumn('id', 'integer', array('notnull' => true));
$table->setPrimaryKey(array('id'));
Expand All @@ -898,7 +898,7 @@ protected function getTestTable($name, $options=array())

protected function getTestCompositeTable($name)
{
$table = new Table($name, array(), array(), array(), array(), false, array());
$table = new Table($name, array(), array(), array(), array(), array());
$table->setSchemaConfig($this->_sm->createSchemaConfig());
$table->addColumn('id', 'integer', array('notnull' => true));
$table->addColumn('other_id', 'integer', array('notnull' => true));
Expand Down
2 changes: 1 addition & 1 deletion tests/Doctrine/Tests/DBAL/Schema/TableTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ public function testConstraints()

public function testOptions()
{
$table = new Table("foo", array(), array(), array(), array(), false, array("foo" => "bar"));
$table = new Table("foo", array(), array(), array(), array(), array("foo" => "bar"));

self::assertTrue($table->hasOption("foo"));
self::assertEquals("bar", $table->getOption("foo"));
Expand Down

0 comments on commit d7d1c39

Please sign in to comment.