Merge pull request #15497 from nextcloud/3rdparty/doctrine/dbal-292
[3rdparty] Doctrine dbal to 2.9.2
This commit is contained in:
commit
1cfc59c3ad
2
3rdparty
2
3rdparty
|
@ -1 +1 @@
|
|||
Subproject commit c726f713a3c49bf0c826a3a0800be17e24bea85b
|
||||
Subproject commit d183b9cbdc62f2302f34cdf51f92aa45a1bb9f60
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue