diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-10-05 22:21:01 -0700 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-10-06 16:39:29 -0300 |
commit | de360ac565b5fea40f154f03fde3f74f0b4b31a8 (patch) | |
tree | b772e3048eee16d311e1a7d0e025e8c61fb3f55d /activerecord/test/cases/adapters/postgresql | |
parent | 98967293cfef14a70281b47c4a07b5318f94d668 (diff) | |
download | rails-de360ac565b5fea40f154f03fde3f74f0b4b31a8.tar.gz rails-de360ac565b5fea40f154f03fde3f74f0b4b31a8.tar.bz2 rails-de360ac565b5fea40f154f03fde3f74f0b4b31a8.zip |
Merge pull request #7850 from senny/5920_postgres_adapter_table_with_capital_letters
postgres, quote table names when fetching the primary key (#5920)
Conflicts:
activerecord/CHANGELOG.md
activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb
Diffstat (limited to 'activerecord/test/cases/adapters/postgresql')
-rw-r--r-- | activerecord/test/cases/adapters/postgresql/postgresql_adapter_test.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/test/cases/adapters/postgresql/postgresql_adapter_test.rb b/activerecord/test/cases/adapters/postgresql/postgresql_adapter_test.rb index 3eb73d3093..0de3786eb8 100644 --- a/activerecord/test/cases/adapters/postgresql/postgresql_adapter_test.rb +++ b/activerecord/test/cases/adapters/postgresql/postgresql_adapter_test.rb @@ -14,6 +14,10 @@ module ActiveRecord assert_equal 'id', @connection.primary_key('ex') end + def test_primary_key_works_tables_containing_capital_letters + assert_equal 'id', @connection.primary_key('CamelCase') + end + def test_non_standard_primary_key @connection.exec_query('drop table if exists ex') @connection.exec_query('create table ex(data character varying(255) primary key)') |