|
18 | 18 | use Yiisoft\Db\Expression\Expression; |
19 | 19 | use Yiisoft\Db\Helper\DbArrayHelper; |
20 | 20 | use Yiisoft\Db\Schema\Builder\ColumnInterface; |
21 | | -use Yiisoft\Db\Schema\Column\ColumnFactoryInterface; |
22 | 21 | use Yiisoft\Db\Schema\Column\ColumnSchemaInterface; |
23 | 22 | use Yiisoft\Db\Schema\TableSchemaInterface; |
24 | | -use Yiisoft\Db\Sqlite\Column\ColumnFactory; |
25 | 23 |
|
26 | 24 | use function array_change_key_case; |
27 | 25 | use function array_column; |
@@ -81,11 +79,6 @@ public function createColumn(string $type, array|int|string $length = null): Col |
81 | 79 | return new Column($type, $length); |
82 | 80 | } |
83 | 81 |
|
84 | | - public function getColumnFactory(): ColumnFactoryInterface |
85 | | - { |
86 | | - return new ColumnFactory(); |
87 | | - } |
88 | | - |
89 | 82 | /** |
90 | 83 | * Returns all table names in the database. |
91 | 84 | * |
@@ -445,8 +438,10 @@ public function getSchemaDefaultValues(string $schema = '', bool $refresh = fals |
445 | 438 | */ |
446 | 439 | private function loadColumnSchema(array $info): ColumnSchemaInterface |
447 | 440 | { |
| 441 | + $columnFactory = $this->db->getColumnFactory(); |
| 442 | + |
448 | 443 | $dbType = strtolower($info['type']); |
449 | | - $column = $this->getColumnFactory()->fromDefinition($dbType, ['name' => $info['name']]); |
| 444 | + $column = $columnFactory->fromDefinition($dbType, ['name' => $info['name']]); |
450 | 445 | $column->dbType($dbType); |
451 | 446 | $column->allowNull(!$info['notnull']); |
452 | 447 | $column->primaryKey((bool) $info['pk']); |
|
0 commit comments