mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
DDC-625: orm:schema-tool:update --dump-sql showing SQL when DB is up-to-date #773
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @doctrinebot on GitHub (Jun 3, 2010).
Originally assigned to: @beberlei on GitHub.
Jira issue originally created by user darkangel:
With the following entities ...
\
@doctrinebot commented on GitHub (Jun 3, 2010):
@doctrinebot commented on GitHub (Jun 22, 2010):
Comment created by shurakai:
This is most probably equivalent with the following problem:
{quote}
It's got to do with cli: when you DB is up to date and you run orm:schema-tool:update --dump-sql, you get something like this:
ALTER TABLE user_users CHANGE avatar avatar LONGTEXT NOT NULL <- but the column avatar is already LONGTEXT
This is caused by the following: Two schema objects are being compared. The first schema is created from the current mapping files (YAML, e.g.) and within these, this column is marked as "object". When the DB is setup, object is transferred into another type, like LONGTEXT. (Platform dependent)
The second schema is created from your current database and is marked as "TextType" because Doctrine cannot decide which other type - there are several who use LONGTEXT - would be correct
{quote}
See /DBAL/Schema/Comparator.php ll. 172ff. & 293
Comparing whether both Types return the same SQL-Statement might do the job but would be really ugly.
@doctrinebot commented on GitHub (Jun 28, 2010):
Comment created by @beberlei:
The columnDefintion affected field can obviously not be solved by any means.
The foreign key thing i see more often in my own projects though, i have to dig deeper there.
@doctrinebot commented on GitHub (Jul 9, 2010):
Comment created by @beberlei:
Fixed Foreign Key issue in DBAL master, it was an error in the MySQL query to fetch the foreign keys.
@doctrinebot commented on GitHub (Jul 9, 2010):
Issue was closed with resolution "Fixed"