diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2011-10-18 13:30:01 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-10-18 13:30:01 -0700 |
commit | c2f3c9bf56534f8f50b4e47a7e18e822f6600bbe (patch) | |
tree | 210d914184714eaf437b923df346c4085d43f564 /activerecord/test | |
parent | 6a28c512e358a95bbabd24af9d2b0608df787158 (diff) | |
download | rails-c2f3c9bf56534f8f50b4e47a7e18e822f6600bbe.tar.gz rails-c2f3c9bf56534f8f50b4e47a7e18e822f6600bbe.tar.bz2 rails-c2f3c9bf56534f8f50b4e47a7e18e822f6600bbe.zip |
only use now() on pg!
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/migration_test.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/activerecord/test/cases/migration_test.rb b/activerecord/test/cases/migration_test.rb index 6ce7ae7877..b3f1785f44 100644 --- a/activerecord/test/cases/migration_test.rb +++ b/activerecord/test/cases/migration_test.rb @@ -474,8 +474,10 @@ if ActiveRecord::Base.connection.supports_migrations? Person.connection.execute "insert into people (id, wealth, created_at, updated_at) values (people_seq.nextval, 12345678901234567890.0123456789, 0, 0)" elsif current_adapter?(:OpenBaseAdapter) || (current_adapter?(:MysqlAdapter) && Mysql.client_version < 50003) #before mysql 5.0.3 decimals stored as strings Person.connection.execute "insert into people (wealth, created_at, updated_at) values ('12345678901234567890.0123456789', 0, 0)" - else + elsif current_adapter?(:PostgreSQLAdapter) Person.connection.execute "insert into people (wealth, created_at, updated_at) values (12345678901234567890.0123456789, now(), now())" + else + Person.connection.execute "insert into people (wealth, created_at, updated_at) values (12345678901234567890.0123456789, 0, 0)" end # SELECT |