|
|
@@ -61,9 +61,14 @@ class SqliteSchema extends BaseSchema
|
|
|
}
|
|
|
|
|
|
$col = strtolower($matches[2]);
|
|
|
- $length = null;
|
|
|
+ $length = $precision = null;
|
|
|
if (isset($matches[3])) {
|
|
|
- $length = (int)$matches[3];
|
|
|
+ $length = $matches[3];
|
|
|
+ if (strpos($length, ',') !== false) {
|
|
|
+ [$length, $precision] = explode(',', $length);
|
|
|
+ }
|
|
|
+ $length = (int)$length;
|
|
|
+ $precision = (int)$precision;
|
|
|
}
|
|
|
|
|
|
if ($col === 'bigint') {
|
|
|
@@ -79,10 +84,10 @@ class SqliteSchema extends BaseSchema
|
|
|
return ['type' => TableSchema::TYPE_INTEGER, 'length' => $length, 'unsigned' => $unsigned];
|
|
|
}
|
|
|
if (strpos($col, 'decimal') !== false) {
|
|
|
- return ['type' => TableSchema::TYPE_DECIMAL, 'length' => null, 'unsigned' => $unsigned];
|
|
|
+ return ['type' => TableSchema::TYPE_DECIMAL, 'length' => $length, 'precision' => $precision, 'unsigned' => $unsigned];
|
|
|
}
|
|
|
if (in_array($col, ['float', 'real', 'double'])) {
|
|
|
- return ['type' => TableSchema::TYPE_FLOAT, 'length' => null, 'unsigned' => $unsigned];
|
|
|
+ return ['type' => TableSchema::TYPE_FLOAT, 'length' => $length, 'precision' => $precision, 'unsigned' => $unsigned];
|
|
|
}
|
|
|
|
|
|
if (strpos($col, 'boolean') !== false) {
|