<!-- 
RSS generated by JIRA (5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5) at Sat May 18 12:33:00 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/DC-292/DC-292.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>[DC-292] no migrations diff on template change</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-292</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;the generate-migrations-diff does not create migrations if the template changes fields on the model.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;p&gt;File:&lt;br/&gt;
  tableName: files&lt;br/&gt;
  inheritance:&lt;br/&gt;
    extends: Eeecore_Record_File&lt;br/&gt;
  actAs:&lt;br/&gt;
    Fileable:&lt;/p&gt;


&lt;p&gt;The Fileable Template does the following... (the &quot;fileFields&quot; option stores a couple of fields to add to the model)&lt;/p&gt;

&lt;p&gt;public function setTableDefinition()&lt;br/&gt;
	{&lt;/p&gt;

&lt;p&gt;			foreach ($this-&amp;gt;_options&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;fileFields&amp;#39;&amp;#93;&lt;/span&gt; as $key =&amp;gt; $field)&lt;/p&gt;
{
				$this-&amp;gt;hasColumn($field[&apos;name&apos;], $field[&apos;type&apos;], $field[&apos;length&apos;], $field[&apos;options&apos;]);
                         }
&lt;p&gt;}&lt;/p&gt;


&lt;p&gt;everything works fine on generate-migrations-models (the initial migrations)... but if we change something on the &quot;fileFields&quot; the generate-migrations-diff call doesn&apos;t do anything. We have to rebuild all migrations or write a new migration by hand.&lt;/p&gt;

</description>
                <environment></environment>
            <key id="10508">DC-292</key>
            <summary>no migrations diff on template change</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/reopened.png">Reopened</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="jwage">Jonathan H. Wage</assignee>
                                <reporter username="jensen83">Christian Jaentsch</reporter>
                        <labels>
                    </labels>
                <created>Wed, 25 Nov 2009 13:45:09 +0000</created>
                <updated>Mon, 1 Mar 2010 19:44:09 +0000</updated>
                                    <version>1.2.0-RC1</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="11061" author="jwage" created="Mon, 7 Dec 2009 19:59:56 +0000"  >&lt;p&gt;I added coverage for this issue and it is working as expected. I compare two schemas:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;Article:
  columns:
    title: string(255)
    body: clob
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;and I compare it to this one:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;Article:
  actAs: [Timestampable]
  columns:
    title: string(255)
    body: clob
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;And now I do this:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;        $migration = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; Doctrine_Migration(dirname(__FILE__) . &apos;/DC292/migrations&apos;);
        $diff = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; Doctrine_Migration_Diff(dirname(__FILE__) . &apos;/DC292/from.yml&apos;, dirname(__FILE__) . &apos;/DC292/to.yml&apos;, $migration);
        $changes = $diff-&amp;gt;generateChanges();
        print_r($changes);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;It has this in the array:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;    [created_columns] =&amp;gt; Array
        (
            [article] =&amp;gt; Array
                (
                    [created_at] =&amp;gt; Array
                        (
                            [notnull] =&amp;gt; 1
                            [type] =&amp;gt; timestamp
                            [length] =&amp;gt; 25
                        )

                    [updated_at] =&amp;gt; Array
                        (
                            [notnull] =&amp;gt; 1
                            [type] =&amp;gt; timestamp
                            [length] =&amp;gt; 25
                        )

                )

        )

&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="11082" author="jensen83" created="Tue, 8 Dec 2009 13:42:45 +0000"  >&lt;p&gt;The problem does not occur if you compare 2 schemas while one has a certain template and the other not.&lt;/p&gt;

&lt;p&gt;In my case the problem occurs when the 2 schemas both already have the same template definition but in one case the template itself has changed (e.g. injects one more field into the database table of a certain model via setTableDefinition).&lt;/p&gt;</comment>
                    <comment id="11097" author="jwage" created="Tue, 8 Dec 2009 18:03:35 +0000"  >&lt;p&gt;When I test that it works as well. Can you show some kind of reproducible test case?&lt;/p&gt;</comment>
                    <comment id="11930" author="jwage" created="Mon, 1 Mar 2010 19:44:09 +0000"  >&lt;p&gt;Maybe you could add a test case for this?&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>
</channel>
</rss>