#primary_keys(table_name)
[ GitHub ]# File 'activerecord/lib/active_record/connection_adapters/schema_cache.rb', line 16
def primary_keys(table_name) @primary_keys[table_name] ||= table_exists?(table_name) ? connection.primary_key(table_name) : nil end