Skip to content
This repository
Browse code

added schema support for mysql bigints

  • Loading branch information...
commit 15555a73099e9e32d3e518d0588932863e41832c 1 parent 6a95b57
Tommy MacWilliam authored August 26, 2012 markstory committed August 30, 2012
4  lib/Cake/Model/Datasource/Database/Mysql.php
@@ -108,6 +108,7 @@ class Mysql extends DboSource {
108 108
 		'primary_key' => array('name' => 'NOT NULL AUTO_INCREMENT'),
109 109
 		'string' => array('name' => 'varchar', 'limit' => '255'),
110 110
 		'text' => array('name' => 'text'),
  111
+		'biginteger' => array('name' => 'bigint', 'limit' => '20'),
111 112
 		'integer' => array('name' => 'int', 'limit' => '11', 'formatter' => 'intval'),
112 113
 		'float' => array('name' => 'float', 'formatter' => 'floatval'),
113 114
 		'datetime' => array('name' => 'datetime', 'format' => 'Y-m-d H:i:s', 'formatter' => 'date'),
@@ -646,6 +647,9 @@ public function column($real) {
646 647
 		if (($col === 'tinyint' && $limit == 1) || $col === 'boolean') {
647 648
 			return 'boolean';
648 649
 		}
  650
+		if (strpos($col, 'bigint') !== false || $col === 'bigint') {
  651
+			return 'biginteger';
  652
+		}
649 653
 		if (strpos($col, 'int') !== false) {
650 654
 			return 'integer';
651 655
 		}

0 notes on commit 15555a7

Please sign in to comment.
Something went wrong with that request. Please try again.