<!-- 
RSS generated by JIRA (5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5) at Sun May 26 01:52:33 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/DMIG-36/DMIG-36.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>[DMIG-36] Iterating over versions is very slow</title>
                <link>http://www.doctrine-project.org/jira/browse/DMIG-36</link>
                <project id="10041" key="DMIG">Doctrine Migrations</project>
                        <description>&lt;p&gt;When iterating migration versions, a call to SchemaManager::createSchema() is done for every versions.  Four our schema, this call take about 1 second to execute.  With already 30 migrations, this begin to be a problem.&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;
$versions = $configuration-&amp;gt;registerMigrationsFromDirectory($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_migration_folder);
foreach($versions as $version){
    &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt;(!$version-&amp;gt;isMigrated()){
        $version-&amp;gt;markMigrated();
    }

}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;


&lt;p&gt;The problem is in Migrations\Configuration\Configuration::createMigrationTable() which does not set the migrationTableCreated flag when the table already exists.&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;
&lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function createMigrationTable()
{
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;validate();

        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;migrationTableCreated) {
            &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;;
        }

        $schema = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;connection-&amp;gt;getSchemaManager()-&amp;gt;createSchema();
        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ( ! $schema-&amp;gt;hasTable($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;migrationsTableName)) {
            $columns = array(
                &apos;version&apos; =&amp;gt; &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; Column(&apos;version&apos;, Type::getType(&apos;string&apos;), array(&apos;length&apos; =&amp;gt; 14)),
            );
            $table = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; Table($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;migrationsTableName, $columns);
            $table-&amp;gt;setPrimaryKey(array(&apos;version&apos;));
            $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;connection-&amp;gt;getSchemaManager()-&amp;gt;createTable($table);

            $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;migrationTableCreated = &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;;

            &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;;
        }
        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;;
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="14668">DMIG-36</key>
            <summary>Iterating over versions is very slow</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="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="rickdt">Eric Durand-Tremblay</reporter>
                        <labels>
                    </labels>
                <created>Tue, 5 Mar 2013 15:52:51 +0000</created>
                <updated>Tue, 5 Mar 2013 15:53:36 +0000</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>
</channel>
</rss>