yahonda/rails — comment on commit 8567557c2caa737c03238ea3abb4a05062ebd172
File:  line 0
By yahonda:

To address following errors with PostgreSQL and Oracle database, Insert current_timestamp for PostgreSQL, systimestamp for Oracle.
This error does not occur with MySQL 5.5 in my environment.

```ruby
$ cd activerecord
$ rake test_oracle
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/.rvm/gems/ruby-1.9.3-rc1@rails_master/bundler/gems/oracle-enhanced-d39369c88d2d/lib/active_record/connection_adapters/oracle_enhanced_oci_connection.rb:469:in `exec'
/home/yahonda/.rvm/gems/ruby-1.9.3-rc1@rails_master/bundler/gems/oracle-enhanced-d39369c88d2d/lib/active_record/connection_adapters/oracle_enhanced_oci_connection.rb:88:in `exec'
/home/yahonda/.rvm/gems/ruby-1.9.3-rc1@rails_master/bundler/gems/oracle-enhanced-d39369c88d2d/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/.rvm/gems/ruby-1.9.3-rc1@rails_master/bundler/gems/oracle-enhanced-d39369c88d2d/lib/active_record/connection_adapters/oracle_enhanced_adapter.rb:1285:in `log'
/home/yahonda/.rvm/gems/ruby-1.9.3-rc1@rails_master/bundler/gems/oracle-enhanced-d39369c88d2d/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'

3100 tests, 9510 assertions, 0 failures, 1 errors, 0 skips
rake aborted!
```

```ruby
$ rake test_postgresql

1) Error:
test_native_decimal_insert_manual_vs_automatic(MigrationTest):
ActiveRecord::StatementInvalid: PGError: ERROR: column "created_at" is of type timestamp without time zone but expression is of type integer
LINE 1: ..., updated_at) values (12345678901234567890.0123456789, 0, 0)
^
HINT: You will need to rewrite or cast the expression.
: insert into people (wealth, created_at, updated_at) values (12345678901234567890.0123456789, 0, 0)
/var/lib/jenkins/jobs/rails_test_oracle/workspace/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb:581:in `async_exec'
/var/lib/jenkins/jobs/rails_test_oracle/workspace/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb:581:in `block in execute'
/var/lib/jenkins/jobs/rails_test_oracle/workspace/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:257:in `block in log'
/var/lib/jenkins/jobs/rails_test_oracle/workspace/activesupport/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/var/lib/jenkins/jobs/rails_test_oracle/workspace/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:252:in `log'
/var/lib/jenkins/jobs/rails_test_oracle/workspace/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb:580:in `execute'
/var/lib/jenkins/jobs/rails_test_oracle/workspace/activerecord/test/cases/migration_test.rb:478:in `test_native_decimal_insert_manual_vs_automatic'
/var/lib/jenkins/.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'
```