Skip to content

Commit 8dcddb0

Browse files
Matt-PMCTfabpot
authored andcommitted
SQLSRV: Change column type from TEXT to STRING
Using TEXT for the id column results in doctrine setting SQL column to VARCHAR(MAX) which results in an SQL error since the primary key cannot be VARCHAR(MAX). This change allows Doctrine to see the length setting, which is ignored for TEXT objects.
1 parent bbfcf84 commit 8dcddb0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ public function configureSchema(Schema $schema, ?\Closure $isSameDatabase = null
216216
$table->addColumn($this->timeCol, Types::INTEGER)->setNotnull(true);
217217
break;
218218
case 'sqlsrv':
219-
$table->addColumn($this->idCol, Types::TEXT)->setLength(128)->setNotnull(true);
219+
$table->addColumn($this->idCol, Types::STRING)->setLength(128)->setNotnull(true);
220220
$table->addColumn($this->dataCol, Types::BLOB)->setNotnull(true);
221221
$table->addColumn($this->lifetimeCol, Types::INTEGER)->setUnsigned(true)->setNotnull(true);
222222
$table->addColumn($this->timeCol, Types::INTEGER)->setUnsigned(true)->setNotnull(true);

0 commit comments

Comments
 (0)