aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/adapters/postgresql/schema_test.rb
diff options
context:
space:
mode:
authorGrey Baker <greysteil@gmail.com>2015-12-17 09:19:43 +0000
committerGrey Baker <greysteil@gmail.com>2015-12-17 09:25:50 +0000
commitd927f35bf04a93b5fd7aaa5ab8081f6bad070746 (patch)
tree179ec6e11e6ac5081fe6628e932b8d4bfd4742e9 /activerecord/test/cases/adapters/postgresql/schema_test.rb
parentc4f8ce53b1f9af9585aeec9bbb0c66fc9c48ec1b (diff)
downloadrails-d927f35bf04a93b5fd7aaa5ab8081f6bad070746.tar.gz
rails-d927f35bf04a93b5fd7aaa5ab8081f6bad070746.tar.bz2
rails-d927f35bf04a93b5fd7aaa5ab8081f6bad070746.zip
Support passing the schema name prefix to `conenction.indexes`
Support passing the schema name as a prefix to table name in `ConnectionAdapters::SchemaStatements#indexes`. Previously the prefix would be considered a full part of the index name, and only the schema in the current search path would be considered.
Diffstat (limited to 'activerecord/test/cases/adapters/postgresql/schema_test.rb')
-rw-r--r--activerecord/test/cases/adapters/postgresql/schema_test.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/activerecord/test/cases/adapters/postgresql/schema_test.rb b/activerecord/test/cases/adapters/postgresql/schema_test.rb
index 7c9169f6e2..3d55435b6a 100644
--- a/activerecord/test/cases/adapters/postgresql/schema_test.rb
+++ b/activerecord/test/cases/adapters/postgresql/schema_test.rb
@@ -321,6 +321,11 @@ class SchemaTest < ActiveRecord::PostgreSQLTestCase
do_dump_index_tests_for_schema("public, #{SCHEMA_NAME}", INDEX_A_COLUMN, INDEX_B_COLUMN_S1, INDEX_D_COLUMN, INDEX_E_COLUMN)
end
+ def test_dump_indexes_for_table_with_scheme_specified_in_name
+ indexes = @connection.indexes("#{SCHEMA_NAME}.#{TABLE_NAME}")
+ assert_equal 4, indexes.size
+ end
+
def test_with_uppercase_index_name
@connection.execute "CREATE INDEX \"things_Index\" ON #{SCHEMA_NAME}.things (name)"
assert_nothing_raised { @connection.remove_index "things", name: "#{SCHEMA_NAME}.things_Index"}