Browse Source

BIGINTs can also be primary keys

Tommy MacWilliam 13 years ago
parent
commit
68116f7017
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lib/Cake/Model/Datasource/DboSource.php

+ 1 - 1
lib/Cake/Model/Datasource/DboSource.php

@@ -3068,7 +3068,7 @@ class DboSource extends DataSource {
 		}
 		$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';