Skip to content

Commit

Permalink
Merge pull request #3371 from yahonda/fix_ora_00932_error
Browse files Browse the repository at this point in the history
Fix ORA-00932 error when trying to insert 0 to DATE type columns.
  • Loading branch information
tenderlove committed Nov 14, 2011
2 parents ca3b468 + 5bc23e4 commit 11c9fc9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion activerecord/test/cases/migration_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ def test_native_decimal_insert_manual_vs_automatic

# Do a manual insertion
if current_adapter?(:OracleAdapter)
Person.connection.execute "insert into people (id, wealth, created_at, updated_at) values (people_seq.nextval, 12345678901234567890.0123456789, 0, 0)"
Person.connection.execute "insert into people (id, wealth, created_at, updated_at) values (people_seq.nextval, 12345678901234567890.0123456789, sysdate, sysdate)"
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)"
elsif current_adapter?(:PostgreSQLAdapter)
Expand Down

0 comments on commit 11c9fc9

Please sign in to comment.