Skip to content
Snippets Groups Projects
Unverified Commit dc00c8ac authored by Morris Jobke's avatar Morris Jobke Committed by Christoph Wurst
Browse files

Remove "primary" option from schema builder argument $options as it is not...

Remove "primary" option from schema builder argument $options as it is not used anymore and triggers an exception

See https://github.com/doctrine/dbal/commit/138eb85234a1faeaa2e6a32cd7bcc66bb51c64e8#diff-300f55366adb50a32a40882ebdc95c163b141f64cba5f45f20bda04a907b3eb3L82



Signed-off-by: default avatarMorris Jobke <hey@morrisjobke.de>
parent 8b64e92b
No related branches found
No related tags found
No related merge requests found
......@@ -260,8 +260,16 @@ class MDB2SchemaReader {
$options['primary'] = true;
}
$table->addColumn($name, $type, $options);
# not used anymore in the options argument
# see https://github.com/doctrine/dbal/commit/138eb85234a1faeaa2e6a32cd7bcc66bb51c64e8#diff-300f55366adb50a32a40882ebdc95c163b141f64cba5f45f20bda04a907b3eb3L82
# therefore it's read before and then unset right before the addColumn call
$setPrimaryKey = false;
if (!empty($options['primary']) && $options['primary']) {
$setPrimaryKey = true;
}
unset($options['primary']);
$table->addColumn($name, $type, $options);
if ($setPrimaryKey) {
$table->setPrimaryKey([$name]);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment