diff options
author | Yves Senn <yves.senn@gmail.com> | 2014-12-02 11:32:54 +0100 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2014-12-02 11:35:53 +0100 |
commit | af7c6e493c3d586b7b81f8176b4c99c1c791991b (patch) | |
tree | 240ee9766a8ff5f67b2d32981c51d88577dcbcf0 /activerecord/test/schema | |
parent | bcf5b281a88dadd5c5001757b3d1958eb83606b5 (diff) | |
download | rails-af7c6e493c3d586b7b81f8176b4c99c1c791991b.tar.gz rails-af7c6e493c3d586b7b81f8176b4c99c1c791991b.tar.bz2 rails-af7c6e493c3d586b7b81f8176b4c99c1c791991b.zip |
tests, move schema shorthand assertions into pg specific tests.
Diffstat (limited to 'activerecord/test/schema')
-rw-r--r-- | activerecord/test/schema/postgresql_specific_schema.rb | 58 |
1 files changed, 3 insertions, 55 deletions
diff --git a/activerecord/test/schema/postgresql_specific_schema.rb b/activerecord/test/schema/postgresql_specific_schema.rb index e7615392db..def8dbd9f9 100644 --- a/activerecord/test/schema/postgresql_specific_schema.rb +++ b/activerecord/test/schema/postgresql_specific_schema.rb @@ -1,9 +1,8 @@ ActiveRecord::Schema.define do - %w(postgresql_tsvectors postgresql_hstores postgresql_arrays postgresql_moneys postgresql_numbers postgresql_times - postgresql_network_addresses postgresql_uuids postgresql_ltrees postgresql_oids postgresql_xml_data_type defaults - geometrics postgresql_timestamp_with_zones postgresql_partitioned_table postgresql_partitioned_table_parent - postgresql_citext).each do |table_name| + %w(postgresql_arrays postgresql_numbers postgresql_times + postgresql_oids defaults postgresql_timestamp_with_zones + postgresql_partitioned_table postgresql_partitioned_table_parent).each do |table_name| execute "DROP TABLE IF EXISTS #{quote_table_name table_name}" end @@ -53,48 +52,6 @@ _SQL _SQL execute <<_SQL - CREATE TABLE postgresql_uuids ( - id SERIAL PRIMARY KEY, - guid uuid, - compact_guid uuid - ); -_SQL - - execute <<_SQL - CREATE TABLE postgresql_tsvectors ( - id SERIAL PRIMARY KEY, - text_vector tsvector - ); -_SQL - - if 't' == select_value("select 'hstore'=ANY(select typname from pg_type)") - execute <<_SQL - CREATE TABLE postgresql_hstores ( - id SERIAL PRIMARY KEY, - hash_store hstore default ''::hstore - ); -_SQL - end - - if 't' == select_value("select 'ltree'=ANY(select typname from pg_type)") - execute <<_SQL - CREATE TABLE postgresql_ltrees ( - id SERIAL PRIMARY KEY, - path ltree - ); -_SQL - end - - if 't' == select_value("select 'citext'=ANY(select typname from pg_type)") - execute <<_SQL - CREATE TABLE postgresql_citext ( - id SERIAL PRIMARY KEY, - text_citext citext default ''::citext - ); -_SQL - end - - execute <<_SQL CREATE TABLE postgresql_numbers ( id SERIAL PRIMARY KEY, single REAL, @@ -111,15 +68,6 @@ _SQL _SQL execute <<_SQL - CREATE TABLE postgresql_network_addresses ( - id SERIAL PRIMARY KEY, - cidr_address CIDR default '192.168.1.0/24', - inet_address INET default '192.168.1.1', - mac_address MACADDR default 'ff:ff:ff:ff:ff:ff' - ); -_SQL - - execute <<_SQL CREATE TABLE postgresql_oids ( id SERIAL PRIMARY KEY, obj_id OID |