Merge pull request #15497 from nextcloud/3rdparty/doctrine/dbal-292

[3rdparty] Doctrine dbal to 2.9.2
This commit is contained in:
Roeland Jago Douma 2019-05-15 08:57:13 +02:00 committed by GitHub
commit 1cfc59c3ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 23 deletions

@ -1 +1 @@
Subproject commit c726f713a3c49bf0c826a3a0800be17e24bea85b
Subproject commit d183b9cbdc62f2302f34cdf51f92aa45a1bb9f60

View File

@ -23,27 +23,5 @@
namespace OC\DB;
class OCSqlitePlatform extends \Doctrine\DBAL\Platforms\SqlitePlatform {
/**
* {@inheritDoc}
*/
public function getColumnDeclarationSQL($name, array $field) {
$def = parent::getColumnDeclarationSQL($name, $field);
if (!empty($field['autoincrement'])) {
$def .= ' PRIMARY KEY AUTOINCREMENT';
}
return $def;
}
/**
* {@inheritDoc}
*/
protected function _getCreateTableSQL($name, array $columns, array $options = array()){
// if auto increment is set the column is already defined as primary key
foreach ($columns as $column) {
if (!empty($column['autoincrement'])) {
$options['primary'] = null;
}
}
return parent::_getCreateTableSQL($name, $columns, $options);
}
}