aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2015-05-03 18:39:06 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2015-05-03 18:39:06 -0300
commit8847bed3ebe8cffcae2ec4c85070295783c9f8a4 (patch)
tree21d0a443dde039e6769979d5f89b6956e30fc09b /activerecord
parent1515c4d98da3f730ef971fa5a13cad828bd9bef4 (diff)
parent6c8ec48ba372e1496228847101eab29c269fb05e (diff)
downloadrails-8847bed3ebe8cffcae2ec4c85070295783c9f8a4.tar.gz
rails-8847bed3ebe8cffcae2ec4c85070295783c9f8a4.tar.bz2
rails-8847bed3ebe8cffcae2ec4c85070295783c9f8a4.zip
Merge pull request #19987 from kamipo/move_postgresql_specific_schema
Move PostgreSQL specific schema to postgresql_specific_schema.rb
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/test/schema/postgresql_specific_schema.rb11
-rw-r--r--activerecord/test/schema/schema.rb14
2 files changed, 11 insertions, 14 deletions
diff --git a/activerecord/test/schema/postgresql_specific_schema.rb b/activerecord/test/schema/postgresql_specific_schema.rb
index 008503bc24..872fa595b4 100644
--- a/activerecord/test/schema/postgresql_specific_schema.rb
+++ b/activerecord/test/schema/postgresql_specific_schema.rb
@@ -1,5 +1,16 @@
ActiveRecord::Schema.define do
+ enable_extension!('uuid-ossp', ActiveRecord::Base.connection)
+
+ create_table :uuid_parents, id: :uuid, force: true do |t|
+ t.string :name
+ end
+
+ create_table :uuid_children, id: :uuid, force: true do |t|
+ t.string :name
+ t.uuid :uuid_parent_id
+ end
+
%w(postgresql_times postgresql_oids defaults postgresql_timestamp_with_zones
postgresql_partitioned_table postgresql_partitioned_table_parent).each do |table_name|
drop_table table_name, if_exists: true
diff --git a/activerecord/test/schema/schema.rb b/activerecord/test/schema/schema.rb
index 7b42f8a4a5..66f8f1611d 100644
--- a/activerecord/test/schema/schema.rb
+++ b/activerecord/test/schema/schema.rb
@@ -6,20 +6,6 @@ ActiveRecord::Schema.define do
end
end
- #put adapter specific setup here
- case adapter_name
- when "PostgreSQL"
- enable_extension!('uuid-ossp', ActiveRecord::Base.connection)
- create_table :uuid_parents, id: :uuid, force: true do |t|
- t.string :name
- end
- create_table :uuid_children, id: :uuid, force: true do |t|
- t.string :name
- t.uuid :uuid_parent_id
- end
- end
-
-
# ------------------------------------------------------------------- #
# #
# Please keep these create table statements in alphabetical order #