lib/Doctrine/DBAL/Platforms/AbstractPlatform.php 1 location
|
@@ 1654-1656 (lines=3) @@
|
| 1651 |
|
} |
| 1652 |
|
} |
| 1653 |
|
|
| 1654 |
|
if (isset($options['primary']) && ! empty($options['primary'])) { |
| 1655 |
|
$columnListSql .= ', PRIMARY KEY(' . implode(', ', array_unique(array_values($options['primary']))) . ')'; |
| 1656 |
|
} |
| 1657 |
|
|
| 1658 |
|
if (isset($options['indexes']) && ! empty($options['indexes'])) { |
| 1659 |
|
foreach ($options['indexes'] as $index => $definition) { |
lib/Doctrine/DBAL/Platforms/DrizzlePlatform.php 1 location
|
@@ 215-218 (lines=4) @@
|
| 212 |
|
} |
| 213 |
|
|
| 214 |
|
// attach all primary keys |
| 215 |
|
if (isset($options['primary']) && ! empty($options['primary'])) { |
| 216 |
|
$keyColumns = array_unique(array_values($options['primary'])); |
| 217 |
|
$queryFields .= ', PRIMARY KEY(' . implode(', ', $keyColumns) . ')'; |
| 218 |
|
} |
| 219 |
|
|
| 220 |
|
$query = 'CREATE '; |
| 221 |
|
|
lib/Doctrine/DBAL/Platforms/MySqlPlatform.php 1 location
|
@@ 430-433 (lines=4) @@
|
| 427 |
|
} |
| 428 |
|
|
| 429 |
|
// attach all primary keys |
| 430 |
|
if (isset($options['primary']) && ! empty($options['primary'])) { |
| 431 |
|
$keyColumns = array_unique(array_values($options['primary'])); |
| 432 |
|
$queryFields .= ', PRIMARY KEY(' . implode(', ', $keyColumns) . ')'; |
| 433 |
|
} |
| 434 |
|
|
| 435 |
|
$query = 'CREATE '; |
| 436 |
|
|
lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php 1 location
|
@@ 755-758 (lines=4) @@
|
| 752 |
|
{ |
| 753 |
|
$queryFields = $this->getColumnDeclarationListSQL($columns); |
| 754 |
|
|
| 755 |
|
if (isset($options['primary']) && ! empty($options['primary'])) { |
| 756 |
|
$keyColumns = array_unique(array_values($options['primary'])); |
| 757 |
|
$queryFields .= ', PRIMARY KEY(' . implode(', ', $keyColumns) . ')'; |
| 758 |
|
} |
| 759 |
|
|
| 760 |
|
$query = 'CREATE TABLE ' . $tableName . ' (' . $queryFields . ')'; |
| 761 |
|
|
lib/Doctrine/DBAL/Platforms/SqlitePlatform.php 1 location
|
@@ 330-333 (lines=4) @@
|
| 327 |
|
} |
| 328 |
|
} |
| 329 |
|
|
| 330 |
|
if (isset($options['primary']) && ! empty($options['primary'])) { |
| 331 |
|
$keyColumns = array_unique(array_values($options['primary'])); |
| 332 |
|
$queryFields.= ', PRIMARY KEY('.implode(', ', $keyColumns).')'; |
| 333 |
|
} |
| 334 |
|
|
| 335 |
|
if (isset($options['foreignKeys'])) { |
| 336 |
|
foreach ($options['foreignKeys'] as $foreignKey) { |