source/Spiral/Database/Drivers/MySQL/Schemas/ColumnSchema.php 1 location
|
@@ 190-199 (lines=10) @@
|
187 |
|
|
188 |
|
$column->type = $matches['type']; |
189 |
|
|
190 |
|
if (!empty($matches['options'])) { |
191 |
|
$options = $matches['options']; |
192 |
|
|
193 |
|
if (count($options) > 1) { |
194 |
|
$column->precision = (int)$options[0]; |
195 |
|
$column->scale = (int)$options[1]; |
196 |
|
} else { |
197 |
|
$column->size = (int)$options[0]; |
198 |
|
} |
199 |
|
} |
200 |
|
|
201 |
|
//Fetching enum values |
202 |
|
if ($column->abstractType() == 'enum' && !empty($options)) { |
source/Spiral/Database/Drivers/SQLite/Schemas/ColumnSchema.php 1 location
|
@@ 175-184 (lines=10) @@
|
172 |
|
$column->type = $matches['type']; |
173 |
|
|
174 |
|
//Fetching size options |
175 |
|
if (!empty($matches['options'])) { |
176 |
|
$options = explode(',', $matches['options']); |
177 |
|
|
178 |
|
if (count($options) > 1) { |
179 |
|
$column->precision = (int)$options[0]; |
180 |
|
$column->scale = (int)$options[1]; |
181 |
|
} else { |
182 |
|
$column->size = (int)$options[0]; |
183 |
|
} |
184 |
|
} |
185 |
|
|
186 |
|
if ($column->type == 'enum') { |
187 |
|
//Quoted column name |