Skip to content

Commit

Permalink
Merge pull request #15497 from nextcloud/3rdparty/doctrine/dbal-292
Browse files Browse the repository at this point in the history
[3rdparty] Doctrine dbal to 2.9.2
  • Loading branch information
rullzer committed May 15, 2019
2 parents 9fe4d8e + d11caf1 commit 1cfc59c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 23 deletions.
2 changes: 1 addition & 1 deletion 3rdparty
Submodule 3rdparty updated 260 files
22 changes: 0 additions & 22 deletions lib/private/DB/OCSqlitePlatform.php
Expand Up @@ -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);
}
}

0 comments on commit 1cfc59c

Please sign in to comment.