"bitsweat" made AR/Oracle cry... http://dev.rubyonrails.org/changeset/4335 ------------------------------------------------------------------------ r4335 | bitsweat | 2006-05-11 20:59:43 -0700 (Thu, 11 May 2006) | 1 line PostgreSQL: migrations support :limit with :integer columns by mapping limit < 4 to smallint, > 4 to bigint, and anything else to integer. Closes #2900. ------------------------------------------------------------------------ U activerecord/test/migration_test.rb U activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb U activerecord/CHANGELOG Updated to revision 4335. 1) Failure: test_create_table_with_limits(MigrationTest) [./test/migration_test.rb:153]: <"integer"> expected but was <"NUMBER">. 872 tests, 3065 assertions, 1 failures, 0 errors rake aborted! Command failed with status (1): [/usr/pkg/ruby184/bin/ruby -Ilib:test:test/...] (See full trace by running task with --trace)
This can be fixed by enhancing the test to support Oracle''s sql type for integer, which is NUMBER(38), but this test also exposed a difference in how the Oracle adapter is handling sql_type, and I''d like to just fix that. I''ll have a patch submitted by tomorrow that''ll fix this. Michael Schoen wrote:> "bitsweat" made AR/Oracle cry... > > http://dev.rubyonrails.org/changeset/4335 > ------------------------------------------------------------------------ > r4335 | bitsweat | 2006-05-11 20:59:43 -0700 (Thu, 11 May 2006) | 1 line > > PostgreSQL: migrations support :limit with :integer columns by mapping limit < 4 to smallint, > 4 to bigint, and anything else to integer. Closes #2900. > ------------------------------------------------------------------------ > > U activerecord/test/migration_test.rb > U activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb > U activerecord/CHANGELOG > Updated to revision 4335. > > 1) Failure: > test_create_table_with_limits(MigrationTest) [./test/migration_test.rb:153]: > <"integer"> expected but was > <"NUMBER">. > > 872 tests, 3065 assertions, 1 failures, 0 errors > rake aborted! > Command failed with status (1): [/usr/pkg/ruby184/bin/ruby -Ilib:test:test/...] > > (See full trace by running task with --trace) > >
On May 11, 2006, at 10:19 PM, Michael A. Schoen wrote:> This can be fixed by enhancing the test to support Oracle''s sql > type for integer, which is NUMBER(38), but this test also exposed a > difference in how the Oracle adapter is handling sql_type, and I''d > like to just fix that. > > I''ll have a patch submitted by tomorrow that''ll fix this.Each database seems to handle integer limits differently (number of bytes vs. digits), so I removed the additional test cases since the limit isn''t cross-platform anyway. Guess I could have left MySQL in.. Please do update if you add specialized :limit handling for Oracle as well. Thanks! jeremy