[DBAL-289] Wrong diff between Oracle 'Date' type and Metadata 'Date' type Created: 30/May/12 Updated: 21/Nov/13
|Reporter:||Christian Stoller||Assignee:||Benjamin Eberlei|
Oracle Express 11g and doctrine-dbal 2.2.2
The current table structure looks like that:
I think there is a problem with the comparison between Oracles 'Date' type and the Metadata 'Date' type. I am used to use MySQL as DBMS but our customer uses Oracle. MySQL's 'datetime' and Oracle's 'date' type are store the same data.
I am not sure what should be done here. Because this could lead to confusion for all Oracle user.
Maybe there could be a request to the platform in the Schema Comparator here:
|Comment by Christian Stoller [ 30/May/12 ]|
When I put a breakpoint on the second line of the diffColumn method in my IDE and stop there during debugging I have those variable values:
You see that there are different types. But it would be nice if the comparison would say: "Theay are equal - no diff"
|Comment by Benjamin Eberlei [ 08/Jul/12 ]|
This issue can't be fixed. Doctrine has this type abstraction here which prevents a special case fix here. The solution in this case is obvious, set the type to "datetime" on Oracle.
|Comment by Christian Stoller [ 22/Aug/12 ]|
Sorry, this issue commes up again.
When I update my schema with the above YAML mapping, I always get the following error although I haven't changed anything at the mapping.
Okay, I could change the types to 'datetime', but what if I have to move to MySQL? I just want to store 'date' and 'time', not 'datetime'.
|Comment by Steve Müller [ 21/Nov/13 ]|
I think the problem is not the types used but the ALTER TABLE statement generated for Oracle. I think this has been fixed in the current master.
Can you please have a look if this still occurrs with current master?
|Comment by Christian Stoller [ 21/Nov/13 ]|
Sorry, I can't test it anymore, because the project is not set up anymore. But the change seems to be the solution