yahonda/rails — comment on commit 5bc23e4fb503e038c8e24a3a58d4eb1c323e94c8
File:  line 0
By yahonda:

To address the "ORA-00932: inconsistent datatypes" error when insert 0 to created_at and updated_at columns.
Note: sysdate is a Oracle function that returns the current date and time and its datatype is DATE.

```ruby

$ cd activerecord
$ rake test_oracle
... snip ...
Finished tests in 133.716592s, 23.1908 tests/s, 71.1280 assertions/s.

1) Error:
test_native_decimal_insert_manual_vs_automatic(MigrationTest):
ActiveRecord::StatementInvalid: OCIError: ORA-00932: inconsistent datatypes: expected DATE got NUMBER: insert into people (id, wealth, created_at, updated_at) values (people_seq.nextval, 12345678901234567890.0123456789, 0, 0)
stmt.c:312:in oci8lib_191.so
/home/yahonda/.rvm/gems/ruby-1.9.3-rc1@rails_master/gems/ruby-oci8-2.0.6/lib/oci8/oci8.rb:288:in `exec'
/home/yahonda/.rvm/gems/ruby-1.9.3-rc1@rails_master/gems/ruby-oci8-2.0.6/lib/oci8/oci8.rb:116:in `exec'
/home/yahonda/Dropbox/git/oracle-enhanced/lib/active_record/connection_adapters/oracle_enhanced_oci_connection.rb:469:in `exec'
/home/yahonda/Dropbox/git/oracle-enhanced/lib/active_record/connection_adapters/oracle_enhanced_oci_connection.rb:88:in `exec'
/home/yahonda/Dropbox/git/oracle-enhanced/lib/active_record/connection_adapters/oracle_enhanced_adapter.rb:589:in `block in execute'
/home/yahonda/Dropbox/git/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:257:in `block in log'
/home/yahonda/Dropbox/git/rails/activesupport/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/home/yahonda/Dropbox/git/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:252:in `log'
/home/yahonda/Dropbox/git/oracle-enhanced/lib/active_record/connection_adapters/oracle_enhanced_adapter.rb:1285:in `log'
/home/yahonda/Dropbox/git/oracle-enhanced/lib/active_record/connection_adapters/oracle_enhanced_adapter.rb:589:in `execute'
/home/yahonda/Dropbox/git/rails/activerecord/test/cases/migration_test.rb:474:in `test_native_decimal_insert_manual_vs_automatic'
/home/yahonda/.rvm/gems/ruby-1.9.3-rc1@rails_master/gems/mocha-0.10.0/lib/mocha/integration/mini_test/version_230_to_251.rb:28:in `run'

3101 tests, 9511 assertions, 0 failures, 1 errors, 0 skips
rake aborted!
Command failed with status (1): [/home/yahonda/.rvm/rubies/ruby-1.9.3-rc1/b...]
Tasks: TOP => test_oracle
(See full trace by running task with --trace)

```