diff options
author | Alexey <leopard.not.a@gmail.com> | 2012-12-16 04:10:58 +0200 |
---|---|---|
committer | Alexey <leopard.not.a@gmail.com> | 2012-12-16 13:11:10 +0200 |
commit | 9a4a095ed7ea6f0f65cc9e3bf3258cbdd0ddc210 (patch) | |
tree | b5d59edd3a6b8476f6cb09465fe5dc80e66c892a /activerecord/test/schema | |
parent | 2d6abcce55c9024e2ef8753ab710b8a053e96eec (diff) | |
download | rails-9a4a095ed7ea6f0f65cc9e3bf3258cbdd0ddc210.tar.gz rails-9a4a095ed7ea6f0f65cc9e3bf3258cbdd0ddc210.tar.bz2 rails-9a4a095ed7ea6f0f65cc9e3bf3258cbdd0ddc210.zip |
AR supporting new intrange data type on PostgreSQL >= 9.2
Diffstat (limited to 'activerecord/test/schema')
-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 ( |