Unverified Commit 730fec42 authored by Sergei Morozov's avatar Sergei Morozov Committed by GitHub

Merge pull request #3143 from AlessandroMinoccheri/initalize_array

initialize sql array into platform files
parents 7021bdf7 4fa36f17
...@@ -240,7 +240,7 @@ class DrizzlePlatform extends AbstractPlatform ...@@ -240,7 +240,7 @@ class DrizzlePlatform extends AbstractPlatform
$query .= $this->buildTableOptions($options); $query .= $this->buildTableOptions($options);
$query .= $this->buildPartitionOptions($options); $query .= $this->buildPartitionOptions($options);
$sql[] = $query; $sql = [$query];
if (isset($options['foreignKeys'])) { if (isset($options['foreignKeys'])) {
foreach ((array) $options['foreignKeys'] as $definition) { foreach ((array) $options['foreignKeys'] as $definition) {
......
...@@ -457,7 +457,7 @@ class MySqlPlatform extends AbstractPlatform ...@@ -457,7 +457,7 @@ class MySqlPlatform extends AbstractPlatform
$query .= $this->buildTableOptions($options); $query .= $this->buildTableOptions($options);
$query .= $this->buildPartitionOptions($options); $query .= $this->buildPartitionOptions($options);
$sql[] = $query; $sql = [$query];
$engine = 'INNODB'; $engine = 'INNODB';
if (isset($options['engine'])) { if (isset($options['engine'])) {
......
...@@ -782,7 +782,7 @@ class PostgreSqlPlatform extends AbstractPlatform ...@@ -782,7 +782,7 @@ class PostgreSqlPlatform extends AbstractPlatform
$query = 'CREATE TABLE ' . $tableName . ' (' . $queryFields . ')'; $query = 'CREATE TABLE ' . $tableName . ' (' . $queryFields . ')';
$sql[] = $query; $sql = [$query];
if (isset($options['indexes']) && ! empty($options['indexes'])) { if (isset($options['indexes']) && ! empty($options['indexes'])) {
foreach ($options['indexes'] as $index) { foreach ($options['indexes'] as $index) {
......
...@@ -304,7 +304,7 @@ class SQLServerPlatform extends AbstractPlatform ...@@ -304,7 +304,7 @@ class SQLServerPlatform extends AbstractPlatform
} }
$query .= ')'; $query .= ')';
$sql[] = $query; $sql = [$query];
if (isset($options['indexes']) && !empty($options['indexes'])) { if (isset($options['indexes']) && !empty($options['indexes'])) {
foreach ($options['indexes'] as $index) { foreach ($options['indexes'] as $index) {
......
...@@ -351,7 +351,7 @@ class SqlitePlatform extends AbstractPlatform ...@@ -351,7 +351,7 @@ class SqlitePlatform extends AbstractPlatform
} }
} }
$query[] = 'CREATE TABLE ' . $name . ' (' . $queryFields . ')'; $query = ['CREATE TABLE ' . $name . ' (' . $queryFields . ')'];
if (isset($options['alter']) && true === $options['alter']) { if (isset($options['alter']) && true === $options['alter']) {
return $query; return $query;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment