Fixed failures introduced by strict comparison

parent dca1465b
...@@ -212,7 +212,7 @@ class PostgreSqlSchemaManager extends AbstractSchemaManager ...@@ -212,7 +212,7 @@ class PostgreSqlSchemaManager extends AbstractSchemaManager
{ {
$buffer = []; $buffer = [];
foreach ($tableIndexes as $row) { foreach ($tableIndexes as $row) {
$colNumbers = explode(' ', $row['indkey']); $colNumbers = array_map('intval', explode(' ', $row['indkey']));
$colNumbersSql = 'IN (' . join(' ,', $colNumbers) . ' )'; $colNumbersSql = 'IN (' . join(' ,', $colNumbers) . ' )';
$columnNameSql = "SELECT attnum, attname FROM pg_attribute $columnNameSql = "SELECT attnum, attname FROM pg_attribute
WHERE attrelid={$row['indrelid']} AND attnum $colNumbersSql ORDER BY attnum ASC;"; WHERE attrelid={$row['indrelid']} AND attnum $colNumbersSql ORDER BY attnum ASC;";
......
...@@ -70,6 +70,7 @@ class SQLServerSchemaManager extends AbstractSchemaManager ...@@ -70,6 +70,7 @@ class SQLServerSchemaManager extends AbstractSchemaManager
$tableColumn['name'] = ''; $tableColumn['name'] = '';
} }
if ($default !== null) {
while ($default !== ($default2 = preg_replace('/^\((.*)\)$/', '$1', $default))) { while ($default !== ($default2 = preg_replace('/^\((.*)\)$/', '$1', $default))) {
$default = trim($default2, "'"); $default = trim($default2, "'");
...@@ -79,6 +80,7 @@ class SQLServerSchemaManager extends AbstractSchemaManager ...@@ -79,6 +80,7 @@ class SQLServerSchemaManager extends AbstractSchemaManager
$default = $this->_platform->getCurrentTimestampSQL(); $default = $this->_platform->getCurrentTimestampSQL();
} }
}
switch ($dbType) { switch ($dbType) {
case 'nchar': case 'nchar':
......
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