Skip to content

Commit

Permalink
BIGINTs can also be primary keys
Browse files Browse the repository at this point in the history
  • Loading branch information
tmacwill authored and markstory committed Aug 30, 2012
1 parent 15555a7 commit 68116f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Cake/Model/Datasource/DboSource.php
Expand Up @@ -3068,7 +3068,7 @@ public function buildColumn($column) {
}
$out = $this->_buildFieldParameters($out, $column, 'beforeDefault');

if (isset($column['key']) && $column['key'] === 'primary' && $type === 'integer') {
if (isset($column['key']) && $column['key'] === 'primary' && ($type === 'integer' || $type === 'biginteger')) {
$out .= ' ' . $this->columns['primary_key']['name'];
} elseif (isset($column['key']) && $column['key'] === 'primary') {
$out .= ' NOT NULL';
Expand Down

0 comments on commit 68116f7

Please sign in to comment.