I’ve upgraded to Rails 1.1.2, and I’m trying to push this change through
to our build server (Linux/Oracle) and we are getting some errors in the
unit tests using Oracle. Looking at the data in the tests reveals a
precision problem. Looking at the tables tells the whole story.
My development database contains this table:
SQL> describe dls_grids;
Name Null? Type
ID NOT NULL NUMBER(38)
LSD VARCHAR2(2)
SECTION VARCHAR2(2)
TOWNSHIP VARCHAR2(3)
RANGE VARCHAR2(2)
MERIDIAN VARCHAR2(2)
LATITUDE_MIN NUMBER(8,5)
LATITUDE_MAX NUMBER(8,5)
LONGITUDE_MIN NUMBER(8,5)
LONGITUDE_MAX NUMBER(8,5)
But the table that gets created in test looks like this:
SQL> describe dls_grids;
Name Null? Type
ID NOT NULL NUMBER(38)
LSD VARCHAR2(2)
SECTION VARCHAR2(2)
TOWNSHIP VARCHAR2(3)
RANGE VARCHAR2(2)
MERIDIAN VARCHAR2(2)
LATITUDE_MIN NUMBER(8)
LATITUDE_MAX NUMBER(8)
LONGITUDE_MIN NUMBER(8)
LONGITUDE_MAX NUMBER(8)
This is a critical issue for our production application.
I’ve upgraded to Rails 1.1.2, and I’m trying to push this change through
to our build server (Linux/Oracle) and we are getting some errors in the
unit tests using Oracle. Looking at the data in the tests reveals a
precision problem. Looking at the tables tells the whole story.
My development database contains this table:
Are you using migrations to create that table, or
db:test:clone_structure?
If you’re using a migration, you could use “execute” to issue the
direct DDL statement.
I’ve upgraded to Rails 1.1.2, and I’m trying to push this change through
to our build server (Linux/Oracle) and we are getting some errors in the
unit tests using Oracle. Looking at the data in the tests reveals a
precision problem. Looking at the tables tells the whole story.
My development database contains this table:
Are you using migrations to create that table, or
db:test:clone_structure?
If you’re using a migration, you could use “execute” to issue the
direct DDL statement.
You are misunderstanding. The Oracle DEVELOPMENT database, created by
migrations, is working just fine. The Oracle TEST database, created
AUTOMATICALLY by RAKE, in the process of executing a “rake test:units”
command is BAD.
I understood that you were talking about the test database, but you’re
right, it does look broken. I just had a conversation on IRC that
revealed that the Oracle schema dumper also doesn’t handle boolean
(i.e. NUMBER(1)) columns properly.
Sounds like it’s time for a ticket.
Okey, dokey. I’ll see about posting an example. Thanks for confirming.
I understood that you were talking about the test database, but you’re
right, it does look broken. I just had a conversation on IRC that
revealed that the Oracle schema dumper also doesn’t handle boolean
(i.e. NUMBER(1)) columns properly.
Sounds like it’s time for a ticket.
Okey, dokey. I’ll see about posting an example. Thanks for confirming.
Ok, this is bad. It doesn’t actually work right for MySQL, either.
This is the development database:
I understood that you were talking about the test database, but you’re
right, it does look broken. I just had a conversation on IRC that
revealed that the Oracle schema dumper also doesn’t handle boolean
(i.e. NUMBER(1)) columns properly.