diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-12-17 11:00:06 -0800 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-12-17 11:00:06 -0800 |
commit | cc74088c6cd4da7d3ce7bc0d66c4cae509693622 (patch) | |
tree | bd96188f25c7149155294c87316b3c90bcdc59d9 /activerecord/test/schema/postgresql_specific_schema.rb | |
parent | 75ba92e993d13bf3dffa56f06a72f07dad44b4a6 (diff) | |
parent | 9a4a095ed7ea6f0f65cc9e3bf3258cbdd0ddc210 (diff) | |
download | rails-cc74088c6cd4da7d3ce7bc0d66c4cae509693622.tar.gz rails-cc74088c6cd4da7d3ce7bc0d66c4cae509693622.tar.bz2 rails-cc74088c6cd4da7d3ce7bc0d66c4cae509693622.zip |
Merge pull request #8528 from le0pard/fixed_ar_intrange
AR supporting new int4range and int8range data type on PostgreSQL >= 9.2
Diffstat (limited to 'activerecord/test/schema/postgresql_specific_schema.rb')
-rw-r--r-- | activerecord/test/schema/postgresql_specific_schema.rb | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/activerecord/test/schema/postgresql_specific_schema.rb b/activerecord/test/schema/postgresql_specific_schema.rb index ab2a63d3ea..96fef3a831 100644 --- a/activerecord/test/schema/postgresql_specific_schema.rb +++ b/activerecord/test/schema/postgresql_specific_schema.rb @@ -1,7 +1,7 @@ ActiveRecord::Schema.define do %w(postgresql_tsvectors postgresql_hstores postgresql_arrays postgresql_moneys postgresql_numbers postgresql_times postgresql_network_addresses postgresql_bit_strings postgresql_uuids - postgresql_oids postgresql_xml_data_type defaults geometrics postgresql_timestamp_with_zones postgresql_partitioned_table postgresql_partitioned_table_parent postgresql_json_data_type).each do |table_name| + postgresql_oids postgresql_xml_data_type defaults geometrics postgresql_timestamp_with_zones postgresql_partitioned_table postgresql_partitioned_table_parent postgresql_json_data_type postgresql_intrange_data_type).each do |table_name| execute "DROP TABLE IF EXISTS #{quote_table_name table_name}" end @@ -97,6 +97,16 @@ _SQL ); _SQL end + + if 't' == select_value("select 'int4range'=ANY(select typname from pg_type)") + execute <<_SQL + CREATE TABLE postgresql_intrange_data_type ( + id SERIAL PRIMARY KEY, + int_range int4range, + int_long_range int8range + ); +_SQL + end execute <<_SQL CREATE TABLE postgresql_moneys ( |