Closed GoogleCodeExporter closed 9 years ago
I'm also seeing this which seems suspect, I thought Numerics were supposed to
be DECIMALs in DB2, not DOUBLES:
https://code.google.com/p/ibm-db/source/browse/ibm_db_sa/ibm_db_sa/base.py?repo=
ibm-db-sa#150
Original comment by mattrie...@gmail.com
on 8 Nov 2013 at 7:50
I think I figured out the problem.
The schemadiff code in migrate has some special logic for comparing Floats and
in sqlalchemy, the Float type extends Numeric so that's probably why they have
this special logic, to make sure that a column that is a Numeric is not a Float
and vice-versa, since Float is a Numeric via inheritance.
The problem with the DB2 code is that in the ibm-db-sa driver, there is a
DOUBLE type defined which acts like Float, it extends Numeric but it's not in
the sqlalchemy.types code, it's only in ibm-db-sa.
So the ibm-db-sa driver converts the Float() type to DOUBLE() and the special
logic in the migrate.versioning.schemadiff class doesn't know about it, so it
doesn't handle it special like it does for Float and it thinks there is no
difference, since ibm-db-sa's DOUBLE is a Numeric, which is what the test case
is expecting it to differ on.
When I ran the test with pdb, these were the columns when it was doing the diff:
(Pdb) col_A
Column('data', Numeric(), table=<xtable>)
(Pdb) col_B
Column(u'data', DOUBLE(), table=<xtable>)
(Pdb) n
Original comment by mattrie...@gmail.com
on 8 Nov 2013 at 8:08
You can close this issue, I'm not sure if I'm able to, I don't see any options
for it.
Original comment by mattrie...@gmail.com
on 8 Nov 2013 at 9:04
Original comment by rahul.pr...@in.ibm.com
on 11 Nov 2013 at 5:48
Original issue reported on code.google.com by
mattrie...@gmail.com
on 8 Nov 2013 at 7:06