No need for platform hacks anymore

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
Roeland Jago Douma 2019-05-13 21:45:07 +02:00
parent b50a11d852
commit d11caf1a3a
No known key found for this signature in database
GPG Key ID: F941078878347C0C
1 changed files with 0 additions and 22 deletions

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);
}
}