Skip to content

Commit

Permalink
Improve
Browse files Browse the repository at this point in the history
  • Loading branch information
Tigrov committed May 5, 2024
1 parent 15352af commit cc4a3f5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 99 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
## 2.0.0 under development

- Enh #289: Implement `SqlParser` and `ExpressionBuilder` driver classes (@Tigrov)
- Enh #273: Implement `ColumnSchemaInterface` classes according to the data type of database table columns
for type casting performance. Related with yiisoft/db#752 (@Tigrov)

## 1.2.0 March 21, 2024

Expand All @@ -17,8 +19,6 @@
- Enh #263: Support json type (@Tigrov)
- Enh #278: Move methods from `Command` to `AbstractPdoCommand` class (@Tigrov)
- Bug #268: Fix foreign keys: support multiple foreign keys referencing to one table and possible null columns for reference (@Tigrov)
- Enh #273: Implement `ColumnSchemaInterface` classes according to the data type of database table columns
for type casting performance. Related with yiisoft/db#752 (@Tigrov)
- Bug #271: Refactor `DMLQueryBuilder`, related with yiisoft/db#746 (@Tigrov)

## 1.0.1 July 24, 2023
Expand Down
94 changes: 0 additions & 94 deletions src/ColumnSchema.php

This file was deleted.

5 changes: 2 additions & 3 deletions src/Schema.php
Original file line number Diff line number Diff line change
Expand Up @@ -373,10 +373,10 @@ protected function findColumns(TableSchemaInterface $table): bool
}

$column = $this->loadColumnSchema($info);
$table->column($column->getName(), $column);
$table->column($info['name'], $column);

if ($column->isPrimaryKey()) {
$table->primaryKey($column->getName());
$table->primaryKey($info['name']);
}
}

Expand Down Expand Up @@ -488,7 +488,6 @@ private function loadColumnSchema(array $info): ColumnSchemaInterface
$column->allowNull(!$info['notnull']);
$column->primaryKey((bool) $info['pk']);
$column->dbType($dbType);
$column->phpType($this->getColumnPhpType($type));
$column->defaultValue($this->normalizeDefaultValue($info['dflt_value'], $column));

return $column;
Expand Down

0 comments on commit cc4a3f5

Please sign in to comment.