diff options
author | Jon Leighton <j@jonathanleighton.com> | 2011-12-16 13:07:10 +0000 |
---|---|---|
committer | Jon Leighton <j@jonathanleighton.com> | 2011-12-16 13:52:07 +0000 |
commit | 7f20bb995aa34c6c6869543209595ff811e9dbc3 (patch) | |
tree | 1ba6255c6dd0f6326d0535497b111dcdbfbf49d3 /activerecord/lib/active_record/connection_adapters | |
parent | dee94d8ab5b7d27653052441a3b408db380dd784 (diff) | |
download | rails-7f20bb995aa34c6c6869543209595ff811e9dbc3.tar.gz rails-7f20bb995aa34c6c6869543209595ff811e9dbc3.tar.bz2 rails-7f20bb995aa34c6c6869543209595ff811e9dbc3.zip |
Don't store defaults in the schema cache
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/schema_cache.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/schema_cache.rb b/activerecord/lib/active_record/connection_adapters/schema_cache.rb index a8f7fd3648..da507fd3ae 100644 --- a/activerecord/lib/active_record/connection_adapters/schema_cache.rb +++ b/activerecord/lib/active_record/connection_adapters/schema_cache.rb @@ -8,7 +8,7 @@ module ActiveRecord @connection = conn @tables = {} - @columns = Hash.new do |h, table_name| + @columns = Hash.new do |h, table_name| h[table_name] = conn.columns(table_name, "#{table_name} Columns") end @@ -19,8 +19,7 @@ module ActiveRecord end @primary_keys = Hash.new do |h, table_name| - h[table_name] = table_exists?(table_name) ? - conn.primary_key(table_name) : 'id' + h[table_name] = table_exists?(table_name) ? conn.primary_key(table_name) : nil end end |