Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions src/Platforms/SQLitePlatform.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
use function strpos;
use function strtolower;
use function substr;
use function trim;

/**
* The SQLitePlatform class describes the specifics and dialects of the SQLite
Expand Down Expand Up @@ -288,9 +287,7 @@ protected function _getCreateTableSQL(string $name, array $columns, array $optio

$tableComment = '';
if (isset($options['comment'])) {
$comment = trim($options['comment'], " '");

$tableComment = $this->getInlineTableCommentSQL($comment);
$tableComment = $this->getInlineTableCommentSQL($options['comment']);
}

$query = ['CREATE TABLE ' . $name . ' ' . $tableComment . '(' . $queryFields . ')'];
Expand Down
3 changes: 2 additions & 1 deletion tests/Functional/Driver/PDO/SQLSrv/DriverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
use PHPUnit\Framework\Attributes\RequiresPhpExtension;

use function array_merge;
use function array_replace;

#[RequiresPhpExtension('pdo_sqlsrv')]
class DriverTest extends AbstractDriverTestCase
Expand Down Expand Up @@ -44,7 +45,7 @@ private function getConnection(array $driverOptions): Connection
$params = TestUtil::getConnectionParams();

if (isset($params['driverOptions'])) {
$driverOptions = array_merge($params['driverOptions'], $driverOptions);
$driverOptions = array_replace($params['driverOptions'], $driverOptions);
}

return (new Driver())->connect(
Expand Down
4 changes: 2 additions & 2 deletions tests/Functional/Schema/SchemaManagerFunctionalTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -1202,11 +1202,11 @@ public function testCommentInTable(): void
{
$table = new Table('table_with_comment');
$table->addColumn('id', Types::INTEGER);
$table->setComment('Foo with control characters \'\\');
$table->setComment('\'\\ Foo with control characters \'\\');
$this->dropAndCreateTable($table);

$table = $this->schemaManager->introspectTable('table_with_comment');
self::assertSame('Foo with control characters \'\\', $table->getComment());
self::assertSame('\'\\ Foo with control characters \'\\', $table->getComment());
}

public function testCreatedCompositeForeignKeyOrderIsCorrectAfterCreation(): void
Expand Down