We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Table::setPrimaryKey()
1 parent 5be312d commit 20c72b7Copy full SHA for 20c72b7
1 file changed
Storage/DoctrineStorage.php
@@ -5,6 +5,7 @@
5
use Doctrine\DBAL\Connection;
6
use Doctrine\DBAL\Schema\AbstractSchemaManager;
7
use Doctrine\DBAL\Schema\Column;
8
+use Doctrine\DBAL\Schema\PrimaryKeyConstraint;
9
use Doctrine\DBAL\Schema\Table;
10
use Doctrine\DBAL\Types\Type;
11
use Doctrine\DBAL\Types\Types;
@@ -155,7 +156,12 @@ private function createTable() {
155
156
new Column($this->valueColumn, Type::getType(Types::TEXT)),
157
]);
158
- $table->setPrimaryKey([$this->keyColumn]);
159
+ $table->addPrimaryKeyConstraint(
160
+ PrimaryKeyConstraint::editor()
161
+ ->setUnquotedColumnNames($this->keyColumn)
162
+ ->create()
163
+ );
164
+
165
$this->schemaManager->createTable($table);
166
}
167
0 commit comments