aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorGreg Molnar <molnargerg@gmail.com>2016-03-17 11:54:02 +0100
committerGreg Molnar <molnargerg@gmail.com>2016-03-17 11:54:02 +0100
commit62c01d3c1f9a117d6869cb006e1cfe1ed456df04 (patch)
tree091cf4bb3dee12c854810902139c4db6d0ef44a1 /activerecord/test
parentf5a5988352b165143f0f9d622707c351c1470882 (diff)
downloadrails-62c01d3c1f9a117d6869cb006e1cfe1ed456df04.tar.gz
rails-62c01d3c1f9a117d6869cb006e1cfe1ed456df04.tar.bz2
rails-62c01d3c1f9a117d6869cb006e1cfe1ed456df04.zip
add column type option to create_join_table to support uuid
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/cases/migration/create_join_table_test.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/activerecord/test/cases/migration/create_join_table_test.rb b/activerecord/test/cases/migration/create_join_table_test.rb
index 0a7b57455c..920c472c73 100644
--- a/activerecord/test/cases/migration/create_join_table_test.rb
+++ b/activerecord/test/cases/migration/create_join_table_test.rb
@@ -132,6 +132,13 @@ module ActiveRecord
end
end
+ if current_adapter?(:PostgreSQLAdapter)
+ def test_create_join_table_with_uuid
+ connection.create_join_table :artists, :musics, column_options: { type: :uuid }
+ assert_equal [:uuid, :uuid], connection.columns(:artists_musics).map(&:type)
+ end
+ end
+
private
def with_table_cleanup