Skip to content

Commit

Permalink
only use now() on pg!
Browse files Browse the repository at this point in the history
  • Loading branch information
tenderlove committed Oct 18, 2011
1 parent 6a28c51 commit c2f3c9b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion activerecord/test/cases/migration_test.rb
Expand Up @@ -474,8 +474,10 @@ def test_native_decimal_insert_manual_vs_automatic
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
Expand Down

0 comments on commit c2f3c9b

Please sign in to comment.