<!-- 
RSS generated by JIRA (5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5) at Thu May 23 08:21:14 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-58/DBAL-58.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-58] Schema tool does not see difference between onDelete=&quot;NO ACTION&quot; and onDelete=&quot;RESTRICT&quot;</title>
                <link>http://www.doctrine-project.org/jira/browse/DBAL-58</link>
                <project id="10040" key="DBAL">Doctrine DBAL</project>
                        <description>&lt;p&gt;If database has ON DELETE CASCADE, schema tool detects change to NO ACTION and RESCRICT.&lt;br/&gt;
If database has ON DELETE RESCRICT, schema tool detects change only in case of CASCADE.&lt;br/&gt;
If database has ON DELETE NO ACTION, schema tool detect change only in case of CASCADE.&lt;/p&gt;

&lt;p&gt;Detecting of changes is done by:&lt;br/&gt;
doctrine orm:schema-tool update --dump-sql&lt;br/&gt;
and&lt;br/&gt;
doctrine orm:validate-schema&lt;/p&gt;</description>
                <environment></environment>
            <key id="11754">DBAL-58</key>
            <summary>Schema tool does not see difference between onDelete=&quot;NO ACTION&quot; and onDelete=&quot;RESTRICT&quot;</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="obrys">Jan Obr&#225;til</reporter>
                        <labels>
                    </labels>
                <created>Wed, 11 Aug 2010 08:24:37 +0000</created>
                <updated>Sun, 31 Oct 2010 07:33:20 +0000</updated>
                                                                    <component>Schema Managers</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="13908" author="beberlei" created="Wed, 11 Aug 2010 09:28:03 +0000"  >&lt;p&gt;which database version do yo uuse? can you paste an example schema?&lt;/p&gt;</comment>
                    <comment id="13909" author="obrys" created="Wed, 11 Aug 2010 10:06:16 +0000"  >&lt;p&gt;This is example script with 2 testing entities.&lt;/p&gt;</comment>
                    <comment id="13910" author="obrys" created="Wed, 11 Aug 2010 10:16:16 +0000"  >&lt;p&gt;I have attached script with two entities.&lt;/p&gt;

&lt;p&gt;I have this database version:&lt;br/&gt;
$ mysql --version&lt;br/&gt;
mysql  Ver 14.14 Distrib 5.1.41, for debian-linux-gnu (i486) using readline 6.1&lt;/p&gt;

&lt;p&gt;Check line 44. There is CASCADE.&lt;br/&gt;
Updating schema by: $ doctrine orm:schema-tool:update&lt;/p&gt;

&lt;p&gt;Change CASCADE to NO ACTION&lt;br/&gt;
$ doctrine orm:schema-tool:update --dump-sql&lt;br/&gt;
ALTER TABLE ArticleItem DROP FOREIGN KEY ArticleItem_ibfk_1;&lt;br/&gt;
ALTER TABLE ArticleItem ADD FOREIGN KEY (articleGroupId) REFERENCES ArticleGroup(id) ON DELETE NO ACTION&lt;/p&gt;

&lt;p&gt;everything ok, so: $ doctrine orm:schema-tool:update&lt;/p&gt;

&lt;p&gt;Change NO ACTION to RESTRICT&lt;br/&gt;
$ doctrine orm:schema-tool:update --dump-sql&lt;br/&gt;
// no output!!&lt;/p&gt;

&lt;p&gt;Change RESTRICT to CASCADE&lt;br/&gt;
$ doctrine orm:schema-tool:update --dump-sql&lt;br/&gt;
ALTER TABLE ArticleItem DROP FOREIGN KEY ArticleItem_ibfk_1;&lt;br/&gt;
ALTER TABLE ArticleItem ADD FOREIGN KEY (articleGroupId) REFERENCES ArticleGroup(id) ON DELETE CASCADE&lt;/p&gt;

&lt;p&gt;everything ok, so: $ doctrine orm:schema-tool:update&lt;/p&gt;

&lt;p&gt;Change CASCADE to RESTRICT&lt;br/&gt;
$ doctrine orm:schema-tool:update --dump-sql&lt;br/&gt;
ALTER TABLE ArticleItem DROP FOREIGN KEY ArticleItem_ibfk_1;&lt;br/&gt;
ALTER TABLE ArticleItem ADD FOREIGN KEY (articleGroupId) REFERENCES ArticleGroup(id) ON DELETE RESTRICT&lt;/p&gt;

&lt;p&gt;everything ok, do: $ doctrine orm:schema-tool:update&lt;/p&gt;

&lt;p&gt;Change RESTRICT to NO ACTION&lt;br/&gt;
$ doctrine orm:schema-tool:update --dump-sql&lt;br/&gt;
// no output!!&lt;/p&gt;


&lt;p&gt;So there is no way to update database schema from RESTRICT to NO ACTION and reverse!&lt;/p&gt;
</comment>
                    <comment id="14647" author="beberlei" created="Sun, 31 Oct 2010 07:33:00 +0000"  >&lt;p&gt;Hm you are right, however for MySQL NO ACTION is the same as RESTRICT as stated by &lt;a href=&quot;http://dev.mysql.com/doc/refman/5.1/en/innodb-foreign-key-constraints.html&quot; class=&quot;external-link&quot;&gt;http://dev.mysql.com/doc/refman/5.1/en/innodb-foreign-key-constraints.html&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10736" name="Example.php" size="3950" author="obrys" created="Wed, 11 Aug 2010 10:06:16 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>
</channel>
</rss>