aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/schema
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2012-10-13 19:36:11 -0700
committerRafael Mendonça França <rafaelmfranca@gmail.com>2012-10-13 19:36:11 -0700
commitca618d473dcb9b5cc4000d057df9322376900622 (patch)
treed94e7ba297ba47b1aaf60e7ddc363b366a3c665d /activerecord/test/schema
parent7cc6ee75b6ad2d3959400253604f96a7fcb93ab8 (diff)
parent8fb841bddefbd2b7ad6b3d7b560111ef0d7fefda (diff)
downloadrails-ca618d473dcb9b5cc4000d057df9322376900622.tar.gz
rails-ca618d473dcb9b5cc4000d057df9322376900622.tar.bz2
rails-ca618d473dcb9b5cc4000d057df9322376900622.zip
Merge pull request #7937 from arturopie/7914-defaults-on-domains-and-multiple-schemas
Fixes #7914 - PostgreSQL adapter doesn't fetch column defaults when using multiple schemas and domains
Diffstat (limited to 'activerecord/test/schema')
-rw-r--r--activerecord/test/schema/postgresql_specific_schema.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/activerecord/test/schema/postgresql_specific_schema.rb b/activerecord/test/schema/postgresql_specific_schema.rb
index 2cd9f30b59..d0e7338f15 100644
--- a/activerecord/test/schema/postgresql_specific_schema.rb
+++ b/activerecord/test/schema/postgresql_specific_schema.rb
@@ -12,6 +12,8 @@ ActiveRecord::Schema.define do
execute 'DROP FUNCTION IF EXISTS partitioned_insert_trigger()'
+ execute "DROP SCHEMA IF EXISTS schema_1 CASCADE"
+
%w(accounts_id_seq developers_id_seq projects_id_seq topics_id_seq customers_id_seq orders_id_seq).each do |seq_name|
execute "SELECT setval('#{seq_name}', 100)"
end
@@ -37,7 +39,12 @@ ActiveRecord::Schema.define do
);
_SQL
- execute <<_SQL
+ execute "CREATE SCHEMA schema_1"
+ execute "CREATE DOMAIN schema_1.text AS text"
+ execute "CREATE DOMAIN schema_1.varchar AS varchar"
+ execute "CREATE DOMAIN schema_1.bpchar AS bpchar"
+
+ execute <<_SQL
CREATE TABLE geometrics (
id serial primary key,
a_point point,