diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2017-02-13 03:00:48 +0900 |
---|---|---|
committer | Jeremy Daer <jeremydaer@gmail.com> | 2017-02-12 20:00:08 -0700 |
commit | c6b4b4a52c7ec66d1923ef44dcbc71b582d7b165 (patch) | |
tree | 0c7e4d93e68c9a44eb224c588f3742734c2c2cb4 /activerecord/test/schema | |
parent | 42ed16a987c91dcb1705a414b5da15c5275e2b16 (diff) | |
download | rails-c6b4b4a52c7ec66d1923ef44dcbc71b582d7b165.tar.gz rails-c6b4b4a52c7ec66d1923ef44dcbc71b582d7b165.tar.bz2 rails-c6b4b4a52c7ec66d1923ef44dcbc71b582d7b165.zip |
Schema dumping support for PostgreSQL oid type
Closes #27980
Diffstat (limited to 'activerecord/test/schema')
-rw-r--r-- | activerecord/test/schema/postgresql_specific_schema.rb | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/activerecord/test/schema/postgresql_specific_schema.rb b/activerecord/test/schema/postgresql_specific_schema.rb index a390a76a16..d6cc4e2d6e 100644 --- a/activerecord/test/schema/postgresql_specific_schema.rb +++ b/activerecord/test/schema/postgresql_specific_schema.rb @@ -33,11 +33,14 @@ ActiveRecord::Schema.define do t.interval :scaled_time_interval, precision: 6 end - %w(postgresql_oids postgresql_timestamp_with_zones - postgresql_partitioned_table postgresql_partitioned_table_parent).each do |table_name| - drop_table table_name, if_exists: true + create_table :postgresql_oids, force: true do |t| + t.oid :obj_id end + drop_table 'postgresql_timestamp_with_zones', if_exists: true + drop_table 'postgresql_partitioned_table', if_exists: true + drop_table 'postgresql_partitioned_table_parent', if_exists: true + execute "DROP SEQUENCE IF EXISTS companies_nonstd_seq CASCADE" execute "CREATE SEQUENCE companies_nonstd_seq START 101 OWNED BY companies.id" execute "ALTER TABLE companies ALTER COLUMN id SET DEFAULT nextval('companies_nonstd_seq')" @@ -50,13 +53,6 @@ ActiveRecord::Schema.define do end execute <<_SQL - CREATE TABLE postgresql_oids ( - id SERIAL PRIMARY KEY, - obj_id OID - ); -_SQL - - execute <<_SQL CREATE TABLE postgresql_timestamp_with_zones ( id SERIAL PRIMARY KEY, time TIMESTAMP WITH TIME ZONE |