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,14 +70,16 @@ class SQLServerSchemaManager extends AbstractSchemaManager ...@@ -70,14 +70,16 @@ class SQLServerSchemaManager extends AbstractSchemaManager
$tableColumn['name'] = ''; $tableColumn['name'] = '';
} }
while ($default !== ($default2 = preg_replace('/^\((.*)\)$/', '$1', $default))) { if ($default !== null) {
$default = trim($default2, "'"); while ($default !== ($default2 = preg_replace('/^\((.*)\)$/', '$1', $default))) {
$default = trim($default2, "'");
if ($default !== 'getdate()') { if ($default !== 'getdate()') {
continue; continue;
} }
$default = $this->_platform->getCurrentTimestampSQL(); $default = $this->_platform->getCurrentTimestampSQL();
}
} }
switch ($dbType) { switch ($dbType) {
......
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