Skip to content

Commit

Permalink
Fix test and psalm
Browse files Browse the repository at this point in the history
  • Loading branch information
Tigrov committed Oct 18, 2024
1 parent c03e064 commit 477b8be
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/Column/ColumnFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ protected function getType(string $dbType, array $info = []): string
public function fromPseudoType(string $pseudoType, array $info = []): ColumnSchemaInterface
{
if ($pseudoType === PseudoType::UUID_PK_SEQ) {
unset($info['type']);
$info['primaryKey'] = true;
$info['autoIncrement'] = true;
$info['defaultValue'] = new Expression('newsequentialid()');
Expand All @@ -90,6 +91,7 @@ public function fromPseudoType(string $pseudoType, array $info = []): ColumnSche
public function fromType(string $type, array $info = []): ColumnSchemaInterface
{
if ($type === ColumnType::BINARY) {
unset($info['type']);
return new BinaryColumnSchema($type, ...$info);
}

Expand Down
2 changes: 1 addition & 1 deletion tests/CommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ public function testShowDatabases(): void

$command = $db->createCommand();

$this->assertSame('sqlsrv:Server=localhost,1433;Encrypt=no', $db->getDriver()->getDsn());
$this->assertSame('sqlsrv:Server=127.0.0.1,1433;Encrypt=no', $db->getDriver()->getDsn());
$this->assertSame(['yiitest'], $command->showDatabases());
}

Expand Down

0 comments on commit 477b8be

Please sign in to comment.