src/Phinx/Db/Adapter/SQLiteAdapter.php 1 location
|
@@ 966-968 (lines=3) @@
|
| 963 |
|
$sqlType = $this->getSqlType($column->getType()); |
| 964 |
|
$def = ''; |
| 965 |
|
$def .= strtoupper($sqlType['name']); |
| 966 |
|
if ($column->getPrecision() && $column->getScale()) { |
| 967 |
|
$def .= '(' . $column->getPrecision() . ',' . $column->getScale() . ')'; |
| 968 |
|
} |
| 969 |
|
$limitable = in_array(strtoupper($sqlType['name']), $this->definitionsWithLimits); |
| 970 |
|
if (($column->getLimit() || isset($sqlType['limit'])) && $limitable) { |
| 971 |
|
$def .= '(' . ($column->getLimit() ?: $sqlType['limit']) . ')'; |
src/Phinx/Db/Adapter/SqlServerAdapter.php 1 location
|
@@ 1026-1028 (lines=3) @@
|
| 1023 |
|
if (!in_array($sqlType['name'], $noLimits) && ($column->getLimit() || isset($sqlType['limit']))) { |
| 1024 |
|
$buffer[] = sprintf('(%s)', $column->getLimit() ?: $sqlType['limit']); |
| 1025 |
|
} |
| 1026 |
|
if ($column->getPrecision() && $column->getScale()) { |
| 1027 |
|
$buffer[] = '(' . $column->getPrecision() . ',' . $column->getScale() . ')'; |
| 1028 |
|
} |
| 1029 |
|
|
| 1030 |
|
$properties = $column->getProperties(); |
| 1031 |
|
$buffer[] = $column->getType() === 'filestream' ? 'FILESTREAM' : ''; |
src/Phinx/Db/Adapter/OracleAdapter.php 1 location
|
@@ 899-901 (lines=3) @@
|
| 896 |
|
if (!in_array($column->getType(), $noLimits) && ($column->getLimit() || isset($sqlType['limit']))) { |
| 897 |
|
$buffer[] = sprintf('(%s)', $column->getLimit() ?: $sqlType['limit']); |
| 898 |
|
} |
| 899 |
|
if ($column->getPrecision() && $column->getScale()) { |
| 900 |
|
$buffer[] = '(' . $column->getPrecision() . ',' . $column->getScale() . ')'; |
| 901 |
|
} |
| 902 |
|
|
| 903 |
|
if ($column->getDefault() === null && $column->isNull()) { |
| 904 |
|
$buffer[] = ' DEFAULT NULL'; |