aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/schema
diff options
context:
space:
mode:
authorJack Christensen <jack@jackchristensen.com>2010-01-23 20:16:29 -0600
committerGeoff Buesing <gbuesing@gmail.com>2010-01-25 20:57:07 -0600
commitc5b652f3d25ef92ae0f67551464fb03bda6aeb4f (patch)
tree9d6708a81f3c9b72a65ead87a0aeb82fda493978 /activerecord/test/schema
parent64f8c87b1dab9bc9b6324fd6a3d77945f4b62821 (diff)
downloadrails-c5b652f3d25ef92ae0f67551464fb03bda6aeb4f.tar.gz
rails-c5b652f3d25ef92ae0f67551464fb03bda6aeb4f.tar.bz2
rails-c5b652f3d25ef92ae0f67551464fb03bda6aeb4f.zip
PostgreSQLAdapter: set time_zone to UTC when Base.default_timezone == :utc so that Postgres doesn't incorrectly offset-adjust values inserted into TIMESTAMP WITH TIME ZONE columns [#3777 state:resolved]
Diffstat (limited to 'activerecord/test/schema')
-rw-r--r--activerecord/test/schema/postgresql_specific_schema.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/activerecord/test/schema/postgresql_specific_schema.rb b/activerecord/test/schema/postgresql_specific_schema.rb
index 3d8911bfe9..065d8cfe98 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_arrays postgresql_moneys postgresql_numbers postgresql_times postgresql_network_addresses postgresql_bit_strings
- postgresql_oids postgresql_xml_data_type defaults geometrics).each do |table_name|
+ postgresql_oids postgresql_xml_data_type defaults geometrics postgresql_timestamp_with_zones).each do |table_name|
execute "DROP TABLE IF EXISTS #{quote_table_name table_name}"
end
@@ -100,6 +100,13 @@ _SQL
obj_id OID
);
_SQL
+
+ execute <<_SQL
+ CREATE TABLE postgresql_timestamp_with_zones (
+ id SERIAL PRIMARY KEY,
+ time TIMESTAMP WITH TIME ZONE
+ );
+_SQL
begin
execute <<_SQL