From c4e71b0f3b2bb4d4add2e79b523eb2450786e718 Mon Sep 17 00:00:00 2001 From: Rasmus R Nielsen Date: Mon, 16 Jun 2008 21:28:26 +0200 Subject: [PATCH] mysql adapter now supports the mediumint data type --- .../connection_adapters/mysql_adapter.rb | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb b/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb index 93aafaa..716331c 100755 --- a/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb @@ -459,11 +459,13 @@ module ActiveRecord return super unless type.to_s == 'integer' case limit - when 0..3 + when 0..4 "smallint(#{limit})" - when 4..8 + when 5..6 + "mediumint(#{limit})" + when 7..9 "int(#{limit})" - when 9..20 + when 10..18 "bigint(#{limit})" else 'int(11)' -- 1.5.5.4