#23073 closed Cleanup/optimization (wontfix)
Oracle 11.2.0.1: Number columns (incl. Booleans) defined with default break introspection
Reported by: | Shai Berger | Owned by: | Shai Berger |
---|---|---|---|
Component: | Migrations | Version: | 1.7-rc-1 |
Severity: | Normal | Keywords: | oracle |
Cc: | Tim Graham, Andrew Godwin | Triage Stage: | Accepted |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
It seems that on this specific version of Oracle server, if you define a number column with a default, it gets precision 0. This, in turn, means it will be introspected as an IntegerField
, even if it was a BooleanField
or a BigIntegerField
to begin with.
I am not quite sure yet about this description, but that seems to be what I get from tests.
I suspect this can be worked-around by changing the alter-column command which removes the default to also redefine the type. I am not sure supporting one specific, superseded, Oracle version, is worth the hassle. The point going for it is that this is the (Oracle 11) version one can download from Oracle for free, and so this is the version we are trying to use for our CI (and others may want to do the same).
Change History (5)
comment:1 by , 10 years ago
Triage Stage: | Unreviewed → Accepted |
---|---|
Type: | Uncategorized → Cleanup/optimization |
Version: | master → 1.7-rc-1 |
comment:2 by , 10 years ago
#22738 notes the value returned for some other backends also vary. Perhaps the fix could be generalized to address that as well.
comment:3 by , 10 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
I tried.
By my understanding now, and also by this StackOverflow question (second answer), the only way to really fix this is to use a Sqlite-backend-style table-recreation for adding columns. With all due respect to Continuous Integration, we are not going to do that to work around an Oracle bug that has already been fixed.
I'm going to just disable the failing test on the specific Oracle server version.
The "Developer Days VM" described in OracleTestSetup includes 11.2.0.2.0 which doesn't have the problem.