1818use Yiisoft \Db \Exception \NotSupportedException ;
1919use Yiisoft \Db \Expression \Expression ;
2020use Yiisoft \Db \Helper \DbArrayHelper ;
21- use Yiisoft \Db \Oracle \Column \ColumnFactory ;
2221use Yiisoft \Db \Schema \Builder \ColumnInterface ;
23- use Yiisoft \Db \Schema \Column \ColumnFactoryInterface ;
2422use Yiisoft \Db \Schema \Column \ColumnSchemaInterface ;
2523use Yiisoft \Db \Schema \TableSchemaInterface ;
2624
@@ -79,11 +77,6 @@ public function createColumn(string $type, array|int|string $length = null): Col
7977 return new Column ($ type , $ length );
8078 }
8179
82- public function getColumnFactory (): ColumnFactoryInterface
83- {
84- return new ColumnFactory ();
85- }
86-
8780 protected function resolveTableName (string $ name ): TableSchemaInterface
8881 {
8982 $ resolvedName = new TableSchema ();
@@ -431,8 +424,10 @@ protected function getTableSequenceName(string $tableName): string|null
431424 */
432425 private function loadColumnSchema (array $ info ): ColumnSchemaInterface
433426 {
427+ $ columnFactory = $ this ->db ->getColumnFactory ();
428+
434429 $ dbType = $ info ['data_type ' ];
435- $ column = $ this -> getColumnFactory () ->fromDbType ($ dbType , [
430+ $ column = $ columnFactory ->fromDbType ($ dbType , [
436431 'scale ' => $ info ['data_scale ' ],
437432 'precision ' => $ info ['data_precision ' ],
438433 ]);
@@ -442,7 +437,6 @@ private function loadColumnSchema(array $info): ColumnSchemaInterface
442437 $ column ->primaryKey ((bool ) $ info ['is_pk ' ]);
443438 $ column ->autoIncrement ($ info ['identity_column ' ] === 'YES ' );
444439 $ column ->size ((int ) $ info ['data_length ' ]);
445- $ column ->dbType ($ dbType );
446440 $ column ->defaultValue ($ this ->normalizeDefaultValue ($ info ['data_default ' ], $ column ));
447441
448442 return $ column ;
0 commit comments