Commit ce3a56ef authored by Marco Pivetta's avatar Marco Pivetta

Applying patch suggested by @guilhermeblanco for SQLite's auto-inc integer PKs

See symfony/symfony#10238
parent 594e326b
......@@ -289,6 +289,11 @@ class SqlitePlatform extends AbstractPlatform
*/
protected function _getCommonIntegerTypeDeclarationSQL(array $columnDef)
{
// sqlite autoincrement is implicit for integer PKs, but not when the field is unsigned
if ( ! empty($columnDef['autoincrement'])) {
return '';
}
return ! empty($columnDef['unsigned']) ? ' UNSIGNED' : '';
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment