<!-- 
RSS generated by JIRA (5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5) at Wed Jun 19 03:06:35 UTC 2013

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary add field=key&field=summary to the URL of your request.
For example:
http://www.doctrine-project.org/jira/si/jira.issueviews:issue-xml/DBAL-167/DBAL-167.xml?field=key&field=summary
-->
<rss version="0.92" >
<channel>
    <title>Doctrine Project</title>
    <link>http://www.doctrine-project.org/jira</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>5.2.7</version>
        <build-number>850</build-number>
        <build-date>21-02-2013</build-date>
    </build-info>

<item>
            <title>[DBAL-167] Schema comparator doesn&apos;t work properly with columnDefinition&apos;s</title>
                <link>http://www.doctrine-project.org/jira/browse/DBAL-167</link>
                <project id="10040" key="DBAL">Doctrine DBAL</project>
                        <description>&lt;p&gt;Schema comparator will mostly always return changed properties on columns for entities defined with &lt;em&gt;columnDefinition&lt;/em&gt; even they are identical in the DB. This is due to weak low-lever compatibility of &lt;em&gt;SchemaTool#getCreateSchemaSql()&lt;/em&gt; and &lt;em&gt;SchemaTool#getSchemaFromMetadata()&lt;/em&gt; &amp;#8211; the first one doesn&apos;t reconstruct &lt;em&gt;columnDefinition&lt;/em&gt;, and the other one never supports &lt;em&gt;&apos;fixed&apos;&lt;/em&gt;, &lt;em&gt;&apos;default&apos;&lt;/em&gt;, cannot determine, whether it is &lt;em&gt;boolean&lt;/em&gt; or &lt;em&gt;integer&lt;/em&gt; (ex. TINYINT in the DB), etc...&lt;/p&gt;

&lt;p&gt;All this results in extremely annoying unnecessary alter-table-change-columns surrounded by dropping and after that re-enabling constrains dependent on those columns.&lt;/p&gt;

&lt;p&gt;I mean stuff like this:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-style: solid;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeHeader panelHeader&quot; style=&quot;border-bottom-width: 1px;border-bottom-style: solid;&quot;&gt;&lt;b&gt;symfony2#app/console doctrine:schema:update --dump-sql&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;...
ALTER TABLE es_hotels DROP FOREIGN KEY FK_527F88EE584598A3F92F3E70;
ALTER TABLE es_hotels DROP FOREIGN KEY FK_527F88EE584598A37A3ABE5D;
ALTER TABLE es_hotels DROP FOREIGN KEY FK_527F88EE584598A3EE551564;
ALTER TABLE es_hotels CHANGE is_active is_active TINYINT(1) NOT NULL DEFAULT &apos;1&apos;, CHANGE checksum checksum CHAR(32) DEFAULT NULL;
ALTER TABLE es_hotels ADD CONSTRAINT FK_527F88EE584598A3F92F3E70 FOREIGN KEY (operator_id, country_id) REFERENCES es_countries(operator_id, id) ON DELETE CASCADE;
ALTER TABLE es_hotels ADD CONSTRAINT FK_527F88EE584598A37A3ABE5D FOREIGN KEY (operator_id, resort_id) REFERENCES es_resorts(operator_id, id) ON DELETE CASCADE;
ALTER TABLE es_hotels ADD CONSTRAINT FK_527F88EE584598A3EE551564 FOREIGN KEY (operator_id, subresort_id) REFERENCES es_subresorts(operator_id, id) ON DELETE CASCADE;
...
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The simple solution would be to fix schema comparator not to signal any changes on columns with &lt;em&gt;columnDefinition&lt;/em&gt; properties. &lt;br/&gt;
But would be much and much better to add some code to all &lt;em&gt;*SchemaManager#getPortableTableColumnDefinition&lt;/em&gt; so they would reconstuct &lt;em&gt;columnDefinition&lt;/em&gt; and they would be matched in the schema comparator. &lt;/p&gt;

&lt;p&gt;I can do this &lt;img class=&quot;emoticon&quot; src=&quot;http://www.doctrine-project.org/jira/images/icons/emoticons/wink.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="13023">DBAL-167</key>
            <summary>Schema comparator doesn&apos;t work properly with columnDefinition&apos;s</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="strygin">Dmitry Strygin</reporter>
                        <labels>
                    </labels>
                <created>Sat, 17 Sep 2011 23:38:42 +0000</created>
                <updated>Mon, 16 Jul 2012 06:57:07 +0000</updated>
                                    <version>2.0.8</version>
                <version>2.1</version>
                <version>2.1.1</version>
                <version>2.1.2</version>
                                                <component>Drivers</component>
                <component>Platforms</component>
                <component>Schema Managers</component>
                        <due></due>
                    <votes>2</votes>
                        <watches>3</watches>
                        <comments>
                    <comment id="16636" author="roderick" created="Sun, 16 Oct 2011 13:58:19 +0000"  >&lt;p&gt;I&apos;m having the same issue on my production webserver, but not on the development webserver. I find that odd. It tries to drop all foreign keys and create them again, although without the CHANGE statement you are referring to, Dmitry.&lt;/p&gt;</comment>
                    <comment id="17206" author="beberlei" created="Mon, 9 Jan 2012 14:33:26 +0000"  >&lt;p&gt;This maybe fixable by making a hash out of the column definition and saving it into a database comment.&lt;/p&gt;

&lt;p&gt;The Foreign Key problem maybe because of an old MySQL version 5.0.x&lt;/p&gt;</comment>
                    <comment id="18310" author="joec4i" created="Mon, 16 Jul 2012 06:57:07 +0000"  >&lt;p&gt;@beberlei, sounds good to me. any plan of implementing this? &lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>
</channel>
</rss>