Skip to content

Commit 20c72b7

Browse files
committed
Do not use method Table::setPrimaryKey() as this is deprecated
1 parent 5be312d commit 20c72b7

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

Storage/DoctrineStorage.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
use Doctrine\DBAL\Connection;
66
use Doctrine\DBAL\Schema\AbstractSchemaManager;
77
use Doctrine\DBAL\Schema\Column;
8+
use Doctrine\DBAL\Schema\PrimaryKeyConstraint;
89
use Doctrine\DBAL\Schema\Table;
910
use Doctrine\DBAL\Types\Type;
1011
use Doctrine\DBAL\Types\Types;
@@ -155,7 +156,12 @@ private function createTable() {
155156
new Column($this->valueColumn, Type::getType(Types::TEXT)),
156157
]);
157158

158-
$table->setPrimaryKey([$this->keyColumn]);
159+
$table->addPrimaryKeyConstraint(
160+
PrimaryKeyConstraint::editor()
161+
->setUnquotedColumnNames($this->keyColumn)
162+
->create()
163+
);
164+
159165
$this->schemaManager->createTable($table);
160166
}
161167

0 commit comments

Comments
 (0)