Skip to content

Commit 01ffced

Browse files
committed
Fixed field INT type on create table
1 parent 6292f55 commit 01ffced

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/Platforms/CockroachPlatform.php

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,19 @@ protected function initializeDoctrineTypeMappings()
5757
$this->doctrineTypeMapping = array_merge($this->doctrineTypeMapping, [
5858
'_text' => 'string',
5959
'_int8' => 'integer',
60-
'int8' => 'integer',
6160
'int2vector' => 'array',
6261
]);
6362
}
63+
64+
/**
65+
* {@inheritDoc}
66+
*/
67+
public function getIntegerTypeDeclarationSQL(array $column)
68+
{
69+
if (! empty($column['autoincrement'])) {
70+
return 'SERIAL';
71+
}
72+
73+
return 'INT4';
74+
}
6475
}

0 commit comments

Comments
 (0)