<!--
RSS generated by JIRA (5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5) at Thu May 23 21:10:52 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/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?jqlQuery=project+%3D+DC+AND+resolution+%3D+Unresolved+AND+component+%3D+Migrations+ORDER+BY+priority+DESC&tempMax=1000&field=key&field=summary
-->
<!-- If you wish to do custom client-side styling of RSS, uncomment this:
<?xml-stylesheet href="http://www.doctrine-project.org/jira/styles/jiraxml2html.xsl" type="text/xsl"?>
-->
<rss version="0.92">
    <channel>
        <title>Doctrine Project</title>
        <link>http://www.doctrine-project.org/jira/secure/IssueNavigator.jspa?reset=true&amp;jqlQuery=project+%3D+DC+AND+resolution+%3D+Unresolved+AND+component+%3D+Migrations+ORDER+BY+priority+DESC</link>
        <description>An XML representation of a search request</description>
                <language>en-us</language>
                        <issue start="0" end="31" total="31"/>
                <build-info>
            <version>5.2.7</version>
            <build-number>850</build-number>
            <build-date>21-02-2013</build-date>
        </build-info>
<item>
            <title>[DC-1053] Renaming a doctrine &apos;string&apos; field may result in loss of data as the field&apos;s type changes. (MySQL)</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-1053</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;Consider the following schema:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeHeader panelHeader&quot; style=&quot;border-bottom-width: 1px;&quot;&gt;&lt;b&gt;schema.yml&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;MyTable:
  columns:
    some_text:        string
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; 

&lt;p&gt;Doctrine creates the table with:&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-sql&quot;&gt;CREATE TABLE `my_table` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `some_text` text,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Now, the following migration should rename the field from &lt;tt&gt;some_text&lt;/tt&gt; to &lt;tt&gt;just_text&lt;/tt&gt;:&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;&amp;lt;?php
class Version1 &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt; Doctrine_Migration_Base
{
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function up()
    {
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;renameColumn(&apos;my_table&apos;, &apos;some_text&apos;, &apos;just_text&apos;);
    }

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function down()
    {
      $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;renameColumn(&apos;my_table&apos;, &apos;just_text&apos;, &apos;some_text&apos;);
    }
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;...however the field gets renamed and the type becomes &lt;tt&gt;VARCHAR(255)&lt;/tt&gt;, as the resulting &lt;tt&gt;SHOW CREATE TABLE my_table&lt;/tt&gt; shows:&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-sql&quot;&gt;CREATE TABLE `my_table` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `a_varchar` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Causes data in the column greater than 255 bytes to get truncated&lt;/p&gt;</description>
                <environment>PHP 5.3.5-1ubuntu7.2ppa1~lucid with Suhosin-Patch (cli) (built: May  7 2011 03:12:27) &lt;br/&gt;
Zend Engine v2.3.0&lt;br/&gt;
Xdebug v2.0.5&lt;br/&gt;
Turnkey LAMP 10.04 LTS x86_64&lt;br/&gt;
Symfony 1.4.11&lt;br/&gt;
mysql  Ver 14.14 Distrib 5.1.41, for debian-linux-gnu (i486) using readline 6.1</environment>
            <key id="13561">DC-1053</key>
            <summary>Renaming a doctrine &apos;string&apos; field may result in loss of data as the field&apos;s type changes. (MySQL)</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="2" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/critical.png">Critical</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="jwage">Jonathan H. Wage</assignee>
                                <reporter username="benlancaster">Ben Lancaster</reporter>
                        <labels>
                    </labels>
                <created>Mon, 26 Mar 2012 20:49:27 +0000</created>
                <updated>Mon, 26 Mar 2012 20:52:02 +0000</updated>
                                    <version>1.2.3</version>
                                                <component>Migrations</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-755] CLONE [DC-558] incorrect handling of MODEL_CLASS_PREFIX causes Doctrine_Migration_Diff to drop the whole database when working from YAML (Regression)</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-755</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;Replicating the bug:&lt;br/&gt;
1. Set ATTR_MODEL_CLASS_PREFIX non-null&lt;br/&gt;
2. create schema file with entity&lt;br/&gt;
3. run doctrine build-all&lt;br/&gt;
4. copy schema file&lt;br/&gt;
5. edit schema file to add column to entity&lt;br/&gt;
6. run generate-migrations-diff from copy of schema file to edited schema file&lt;/p&gt;

&lt;p&gt;Expected (previous) behaviour:&lt;br/&gt;
Migration is generated to add the new column to entity&lt;/p&gt;

&lt;p&gt;Real behaviour:&lt;br/&gt;
Drops entity from database and creates new&lt;/p&gt;</description>
                <environment>Current HEAD of Doctrine 1.2</environment>
            <key id="11528">DC-755</key>
            <summary>CLONE [DC-558] incorrect handling of MODEL_CLASS_PREFIX causes Doctrine_Migration_Diff to drop the whole database when working from YAML (Regression)</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="2" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/critical.png">Critical</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="jwage">Jonathan H. Wage</assignee>
                                <reporter username="andrewcoulton">Andrew Coulton</reporter>
                        <labels>
                    </labels>
                <created>Sun, 20 Jun 2010 09:58:04 +0000</created>
                <updated>Sun, 10 Oct 2010 18:51:58 +0000</updated>
                                    <version>1.2.3</version>
                                                <component>Migrations</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="13377" author="andrewcoulton" created="Sun, 20 Jun 2010 10:08:30 +0000"  >&lt;p&gt;This seems to be a regression caused by the fix for &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DC-558&quot; title=&quot;CLONE -generate-migrations-diff is producing bogus migrations (drops the whole database)&quot;&gt;&lt;del&gt;DC-558&lt;/del&gt;&lt;/a&gt; which added the MODEL_CLASS_PREFIX to the $_toPrefix in Doctrine_Migration_Diff::generateChanges.&lt;/p&gt;

&lt;p&gt;While this fixed the issue when generating diff from models to YAML, it has now created the reverse issue for generating diffs from YAML to YAML - as the models generated for the &quot;from&quot; schema do not get MODEL_CLASS_PREFIX prepended and so now this command will drop all existing tables and recreate.&lt;/p&gt;

&lt;p&gt;I believe the fix may be to amend as:&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;div class=&quot;error&quot;&gt;&lt;span class=&quot;error&quot;&gt;Unable to find source-code formatter for language: php.&lt;/span&gt; Available languages are: actionscript, html, java, javascript, none, sql, xhtml, xml&lt;/div&gt;&lt;pre&gt;        $from = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_generateModels(
            Doctrine_Manager::getInstance()-&amp;gt;getAttribute(Doctrine_Core::ATTR_MODEL_CLASS_PREFIX) . self::$_fromPrefix,
            $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_from);
        $to = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_generateModels(
            Doctrine_Manager::getInstance()-&amp;gt;getAttribute(Doctrine_Core::ATTR_MODEL_CLASS_PREFIX) . self::$_toPrefix,
            $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_to                
        );
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Since it seems that when presented with a folder of models _generateModels ignores the prefix anyway. However, I&apos;m not sure of other impacts possible as a result?&lt;/p&gt;</comment>
                    <comment id="14141" author="andrewcoulton" created="Sun, 29 Aug 2010 06:29:06 +0000"  >&lt;p&gt;I&apos;ve been using and testing the modified version above locally for some time and it seems to work as expected. Any chance of this making it into core? Otherwise, the migrations feature is completely unusable when working YAML-YAML and using model prefixes on the newly released 1.2.3&lt;/p&gt;</comment>
                    <comment id="14144" author="jwage" created="Sun, 29 Aug 2010 12:22:54 +0000"  >&lt;p&gt;Has anyone been able to produce this in a test case?&lt;/p&gt;</comment>
                    <comment id="14182" author="andrewcoulton" created="Mon, 30 Aug 2010 18:16:35 +0000"  >&lt;p&gt;I&apos;ve attached a diff file with the DC755TestCase and the required from and to YAML schema files to reproduce this bug. I wasn&apos;t sure whether you prefer like this or as a git commit?&lt;/p&gt;</comment>
                    <comment id="14183" author="andrewcoulton" created="Mon, 30 Aug 2010 18:24:52 +0000"  >&lt;p&gt;Also attached a diff file of my proposed change to Doctrine_Migration_Diff to resolve this, but as I say unsure if it has implications on other migration types.&lt;/p&gt;</comment>
                    <comment id="14550" author="andrewcoulton" created="Sun, 10 Oct 2010 18:51:58 +0000"  >&lt;p&gt;Fixed by &lt;a href=&quot;http://github.com/acoulton/doctrine1/tree/DC-755&quot; class=&quot;external-link&quot;&gt;http://github.com/acoulton/doctrine1/tree/DC-755&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10752" name="dc755TestCase.diff" size="3114" author="andrewcoulton" created="Mon, 30 Aug 2010 18:16:35 +0000" />
                    <attachment id="10753" name="fix755.diff" size="642" author="andrewcoulton" created="Mon, 30 Aug 2010 18:24:52 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-931] Newly generated Migration Classes failing to load due to method used to determine class name</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-931</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;The loadMigrationClassesFromDirectory() method in Doctrine_Migration uses array_diff on get_declared_classes() between including each classes script.&lt;/p&gt;

&lt;p&gt;When a new migration class is generated by Doctrine_Core::generateMigrationsFromDiff it&apos;s class is loaded, which means loadMigrationClassesFromDirectory silently fails to load the newly generated migration on the same request. This means that scripts that first generate migrations and then apply them must be executed twice - first to generate then to apply.&lt;/p&gt;

&lt;p&gt;The following example code is used to check if the database has been modifed, generate migrations between the base version and the latest models, and then migrate the database if needed:&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;automigrate.php&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;Doctrine_Core::generateYamlFromModels(ROOT_PATH.&apos;tmp/yaml/&apos;, ROOT_PATH.&apos;models/&apos;);
$result = Doctrine_Core::generateMigrationsFromDiff(ROOT_PATH.&apos;tmp/migrations/&apos;, ROOT_PATH.&apos;data/yaml/&apos;, ROOT_PATH.&apos;tmp/yaml/&apos;);

unlink(ROOT_PATH.&apos;data/yaml/schema.yml&apos;);
rename(ROOT_PATH.&apos;tmp/yaml/schema.yml&apos;, ROOT_PATH.&apos;data/yaml/schema.yml&apos;);

$migration = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; Doctrine_Migration(ROOT_PATH.&apos;tmp/migrations&apos;);

$currentVersion = $migration-&amp;gt;getCurrentVersion();
$latestVersion = $migration-&amp;gt;getLatestVersion();
&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ($currentVersion &amp;lt; $latestVersion) {
	$migration-&amp;gt;migrate();
	$&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;app-&amp;gt;addMessage(&lt;span class=&quot;code-quote&quot;&gt;&quot;Database migration completed (from version $currentVersion to version $latestVersion)&quot;&lt;/span&gt;,&lt;span class=&quot;code-quote&quot;&gt;&quot;success&quot;&lt;/span&gt;);
} &lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt; {
	$&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;app-&amp;gt;addMessage(&lt;span class=&quot;code-quote&quot;&gt;&quot;Database is up to date and doesn&apos;t require migration (at version $currentVersion)&quot;&lt;/span&gt;,&lt;span class=&quot;code-quote&quot;&gt;&quot;success&quot;&lt;/span&gt;);
}

&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment>LAMP</environment>
            <key id="12124">DC-931</key>
            <summary>Newly generated Migration Classes failing to load due to method used to determine class name</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="jwage">Jonathan H. Wage</assignee>
                                <reporter username="ppanther">Adam Benson</reporter>
                        <labels>
                    </labels>
                <created>Fri, 19 Nov 2010 02:04:00 +0000</created>
                <updated>Fri, 19 Nov 2010 02:04:00 +0000</updated>
                                    <version>1.2.0-ALPHA1</version>
                <version>1.2.0-ALPHA2</version>
                <version>1.2.0-ALPHA3</version>
                <version>1.2.0-BETA1</version>
                <version>1.2.0-BETA2</version>
                <version>1.2.0-BETA3</version>
                <version>1.2.0-RC1</version>
                <version>1.2.0</version>
                <version>1.2.1</version>
                <version>1.2.2</version>
                <version>1.2.3</version>
                <version>1.2.4</version>
                                                <component>Migrations</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-929] createIndexSql and dropIndexSql don&apos;t use the same logic to get the index name</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-929</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;In the class Doctrine_Export the functions for creating and dropping indexes do not use the same logic to get the name of the index to be created or dropped.&lt;br/&gt;
When creating an index $this-&amp;gt;conn-&amp;gt;quoteIdentifier() is called on the index name. &lt;br/&gt;
When dropping an index $this-&amp;gt;conn-&amp;gt;quoteIdentifier($this-&amp;gt;conn-&amp;gt;formatter-&amp;gt;getIndexName()) is called on the name, which by default adds &apos;_idx&apos; to the index name. Hence, when an index should be dropped in a migration an index with that name is not found because it was created without the &apos;_idx&apos;.&lt;/p&gt;</description>
                <environment>Postgresql 8.4, Symfony 1.4, Doctrine 1.2</environment>
            <key id="12111">DC-929</key>
            <summary>createIndexSql and dropIndexSql don&apos;t use the same logic to get the index name</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="jwage">Jonathan H. Wage</assignee>
                                <reporter username="lea">Lea Haensenberger</reporter>
                        <labels>
                    </labels>
                <created>Tue, 16 Nov 2010 07:57:07 +0000</created>
                <updated>Wed, 7 Sep 2011 19:04:23 +0000</updated>
                                                                    <component>Migrations</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="14754" author="lsmith" created="Tue, 16 Nov 2010 08:04:21 +0000"  >&lt;p&gt;looks to me like this is a bug in index creation. then again fixing the bug will lead to potential BC issues. that being said, anyone affected could &quot;simply&quot; set the index format to empty. also &quot;fixing&quot; the names to the proper format does not require shuffeling around data. so imho the right fix would be to apply the drop naming logic in the create logic.&lt;/p&gt;

&lt;p&gt;what surprises me is that the main reason for appending _idx by default was that many RDBMS will otherwise break because they do not separate identifiers between constraints and indexes etc and therefore people run into collisions without the postfix.&lt;/p&gt;</comment>
                    <comment id="16450" author="johnkary" created="Wed, 7 Sep 2011 19:04:23 +0000"  >&lt;p&gt;Related/Duplicate of &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DC-830&quot; title=&quot;Migration for up() not adding suffix for index&quot;&gt;DC-830&lt;/a&gt; and &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DC-867&quot; title=&quot;Doctrine::ATTR_IDXNAME_FORMAT and Doctrine::ATTR_FKNAME_FORMAT are inconsistently applied during migrations&quot;&gt;DC-867&lt;/a&gt;.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-928] [Migrations] Drop not null is not working in Postgres</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-928</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;When removing the not null from a column the migration does not change anything in the database. This is due to the following check on line 162 of lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Export/Pgsql.php&lt;br/&gt;
if ( ! empty($field&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;definition&amp;#39;&amp;#93;&lt;/span&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;notnull&amp;#39;&amp;#93;&lt;/span&gt;))&lt;/p&gt;

&lt;p&gt;So if notnull is not there or set to false or &apos;0&apos; or 0 the code does not enter into that if statement and therefore no changes are done to the not null value of the column.&lt;/p&gt;</description>
                <environment>Postgresql 8.4, Symfony 1.4, Doctrine 1.2</environment>
            <key id="12110">DC-928</key>
            <summary>[Migrations] Drop not null is not working in Postgres</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="jwage">Jonathan H. Wage</assignee>
                                <reporter username="lea">Lea Haensenberger</reporter>
                        <labels>
                    </labels>
                <created>Tue, 16 Nov 2010 07:56:22 +0000</created>
                <updated>Tue, 16 Nov 2010 11:44:46 +0000</updated>
                                                                    <component>Migrations</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="14755" author="lsmith" created="Tue, 16 Nov 2010 08:05:03 +0000"  >&lt;p&gt;@Lea: can you write up a patch for this? would also be nice if you could check if the same issue affects other drivers.&lt;/p&gt;</comment>
                    <comment id="14756" author="lea" created="Tue, 16 Nov 2010 11:44:21 +0000"  >&lt;p&gt;Here is a patch (attachment). The generate-migrations-diff Task in Symfony sets &apos;notnull&apos; to an empty string if it&apos;s false in the schema.yml, therefore the check for empty string.&lt;/p&gt;

&lt;p&gt;I had a quick look at the classes for other DBs, but that seems to be a postgres only issue.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10861" name="dropNotNullPatch.patch" size="1119" author="lea" created="Tue, 16 Nov 2010 11:44:21 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-888] Foreign key id columns do not respect ATTR_DEFAULT_IDENTIFIER_OPTIONS</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-888</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;Some time ago Jon Wage suggested that one can override the 8-byte default integer type for IDs by setting Doctrine_Core::ATTR_DEFAULT_IDENTIFIER_OPTIONS in configureDoctrine (in a Symfony project), like this:&lt;/p&gt;

&lt;p&gt;  public function configureDoctrine(Doctrine_Manager $manager)&lt;/p&gt;
  {
    // Use 4-byte IDs for backwards compatibility with databases built on
    // Apostrophe 1.4, sfDoctrineGuard pre-5.0, etc. You don&apos;t need this for
    // a brand new site
    $options = $manager-&amp;gt;getAttribute(Doctrine_Core::ATTR_DEFAULT_IDENTIFIER_OPTIONS);
    $options[&apos;length&apos;] = 4;
    $manager-&amp;gt;setAttribute(Doctrine_Core::ATTR_DEFAULT_IDENTIFIER_OPTIONS, $options);
  }

&lt;p&gt;This works for primary key id columns. However it is not respected by foreign key id columns, which do not consult ATTR_DEFAULT_IDENTIFIER_OPTIONS.&lt;/p&gt;

&lt;p&gt;I looked at working around this using ATTR_DEFAULT_COLUMN_OPTIONS, however it is not type-specific. So if you set a length of 4 with that option, it applies not just to all integers but also to dates, datetimes, booleans and many other things that definitely should not be 4 bytes. &lt;/p&gt;

&lt;p&gt;The correct fix seems to be for foreign key id columns to respect ATTR_DEFAULT_IDENTIFIER_OPTIONS. &lt;/p&gt;

&lt;p&gt;Also, ATTR_DEFAULT_COLUMN_OPTIONS should probably let you specify different defaults for each column type as the length option is basically not usable in its current form. But that would not be a particularly clean solution to the foreign key id problem since limiting non-ID integers to 4 bytes should not be necessary.&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;* *&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;The motivation for this bug report:&lt;/p&gt;

&lt;p&gt;The new stable release of sfDoctrineGuardPlugin (for Symfony) does not specify an integer size as it formerly did, so the size of integers now defaults to 8 bytes. This breaks backwards compatibility with existing code that adds foreign key relationships to sfGuard objects like sfGuardUser, etc. Creating migrations to deal with changing this across all tables involved is quite difficult (all foreign key indexes must be dropped and recreated - doctrine:migrations-diff is unable to figure it out, understandably). &lt;/p&gt;</description>
                <environment>Any</environment>
            <key id="12006">DC-888</key>
            <summary>Foreign key id columns do not respect ATTR_DEFAULT_IDENTIFIER_OPTIONS</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="jwage">Jonathan H. Wage</assignee>
                                <reporter username="boutell">Tom Boutell</reporter>
                        <labels>
                    </labels>
                <created>Wed, 13 Oct 2010 12:52:51 +0000</created>
                <updated>Wed, 13 Oct 2010 13:03:15 +0000</updated>
                                    <version>1.2.3</version>
                                                <component>Migrations</component>
                <component>Relations</component>
                <component>Schema Files</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-880] Versionable + I18n creates additional migration with irrelevant data</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-880</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;First run of generate-migrations-diff and migrate creates 2 migration diff files. First one for new tables, second one for new indexes and foreign keys. Than if I run generate-migrations-diff again another version is created although nothing was changed and following is inside:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;1st entry tries to drop a foreign key never been created and not existing in file&lt;/li&gt;
	&lt;li&gt;next entry tries to create a foreign key already existing&lt;/li&gt;
	&lt;li&gt;3rd entry tries to create an existing index&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;After a long try and errorI found out that it&apos;s only happening with I18n plus Versionable behavior.&lt;/p&gt;

&lt;p&gt;As I already have spent much time for a report please have also a look at: &lt;a href=&quot;http://forum.diem-project.org/viewtopic.php?f=2&amp;amp;t=173&amp;amp;sid=5e0e3349c0e15a169bc9990a3104b3f6#p465&quot; class=&quot;external-link&quot;&gt;http://forum.diem-project.org/viewtopic.php?f=2&amp;amp;t=173&amp;amp;sid=5e0e3349c0e15a169bc9990a3104b3f6#p465&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As I&apos;m quite new to Doctrine and Symfony systems I cannot get further, but willing for more investigation if just one could give me a hint where to start.&lt;/p&gt;</description>
                <environment>PHP 5.2, Symfony 1.4, Diem 5.1, Doctrine 1.2.2</environment>
            <key id="11982">DC-880</key>
            <summary>Versionable + I18n creates additional migration with irrelevant data</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="jwage">Jonathan H. Wage</assignee>
                                <reporter username="sanshao">Thomas</reporter>
                        <labels>
                    </labels>
                <created>Wed, 6 Oct 2010 14:37:39 +0000</created>
                <updated>Mon, 19 Sep 2011 08:20:21 +0000</updated>
                                    <version>1.2.4</version>
                                                <component>Behaviors</component>
                <component>I18n</component>
                <component>Migrations</component>
                <component>Relations</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="14551" author="andrewcoulton" created="Sun, 10 Oct 2010 20:50:17 +0000"  >&lt;p&gt;I think this is because the versionable behaviour doesn&apos;t define a table name in the Doctrine_Template_Versionable class. As a result, if using model prefixes, the prefixes are not discarded from the table names when the behaviour model classes are built. This means that the tables have different names to what is expected, so they have different index keys, so the indexes are dropped and recreated as part of the migration.&lt;/p&gt;

&lt;p&gt;I have committed unit tests and patch for this issue (which applies to Searchable also) to &lt;a href=&quot;http://github.com/acoulton/doctrine1/tree/DC-880&quot; class=&quot;external-link&quot;&gt;http://github.com/acoulton/doctrine1/tree/DC-880&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="16492" author="xdade" created="Mon, 19 Sep 2011 08:19:31 +0000"  >&lt;p&gt;I experienced the same problem in the latest version 1.2.4, and the patch proposed by Andrew Coulton solves the problem.&lt;br/&gt;
Why the fix is not included in official release?&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-867] Doctrine::ATTR_IDXNAME_FORMAT and Doctrine::ATTR_FKNAME_FORMAT are inconsistently applied during migrations</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-867</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;Given the following code:&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 up()
    {
        $idx = array(
            &apos;fields&apos; =&amp;gt; array(&apos;profile_id&apos;)
        );

        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;addIndex(&apos;schedules&apos;, &apos;ix_schedules_profile_id&apos;, $idx);
    }
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function down()
    {
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;removeIndex(&apos;schedules&apos;, &apos;ix_schedules_profile_id&apos;);
    }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The &quot;up&quot; function will try to create &quot;ix_schedules_profile_id&quot;, but the &quot;down&quot; function will try to remove &quot;ix_schedules_profile_id_idx&quot;. The same problem exists with foreign keys. The add/remove functions should both use the formatter, or neither should.&lt;/p&gt;</description>
                <environment>postgres 8.4</environment>
            <key id="11923">DC-867</key>
            <summary>Doctrine::ATTR_IDXNAME_FORMAT and Doctrine::ATTR_FKNAME_FORMAT are inconsistently applied during migrations</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="jwage">Jonathan H. Wage</assignee>
                                <reporter username="ryeguy">Ryan Lepidi</reporter>
                        <labels>
                    </labels>
                <created>Wed, 15 Sep 2010 15:36:34 +0000</created>
                <updated>Wed, 7 Sep 2011 18:52:04 +0000</updated>
                                    <version>1.2.3</version>
                                                <component>Migrations</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16448" author="johnkary" created="Wed, 7 Sep 2011 18:52:04 +0000"  >&lt;p&gt;Appears to be duplicate of &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DC-830&quot; title=&quot;Migration for up() not adding suffix for index&quot;&gt;DC-830&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-859] Diff generator doesn&apos;t load models from specified paths</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-859</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;Adding simple testcase, I have two version of PHP model, they differ in primary key.&lt;br/&gt;
version 0 has: stateid = Integer (classic id number)&lt;br/&gt;
version 1 has: stateid = char(2) (fixed length)&lt;/p&gt;

&lt;p&gt;After I run Doctrine_Core::generateMigrationsFromDiff, doctrine will load only the integer model and compare it, so no difference is detected and no migration script created.&lt;/p&gt;

&lt;p&gt;I&apos;m attaching simple project where it doesn&apos;t work (adjust please LIBS_DIR definition for your setup).&lt;/p&gt;

&lt;p&gt;From current codepath I would say when YAML is used, the from/to classes get prefixes.&lt;br/&gt;
When php model directories are used, the classes don&apos;t have have prefixes and their names are identical.&lt;br/&gt;
I think this may be one part of problem.&lt;/p&gt;

&lt;p&gt;&lt;del&gt;Trying to generate YAML files instead from php models lead to migration script dropping all tables. (looks like it&apos;s already reported as &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DC-755&quot; title=&quot;CLONE [DC-558] incorrect handling of MODEL_CLASS_PREFIX causes Doctrine_Migration_Diff to drop the whole database when working from YAML (Regression)&quot;&gt;DC-755&lt;/a&gt;)&lt;/del&gt;&lt;br/&gt;
&lt;em&gt;I did call both yaml generation and diff tool in the same script, which doesn&apos;t work. When I generate schema in other script and call diff tool on schemas later, it works.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Please, I&apos;m willing to work on fix, but give me some ideas what should I try. (I thought about adding prefixes into php model files after they are copied into temp directory (to simulate YAML behavior), or bend the loading of models later, but I&apos;m not sure the rest of code would cope with such fix, or there&apos;s more to do.&lt;/p&gt;</description>
                <environment>WinXP, PHP 5.3.3</environment>
            <key id="11887">DC-859</key>
            <summary>Diff generator doesn&apos;t load models from specified paths</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="jwage">Jonathan H. Wage</assignee>
                                <reporter username="ped">Peter Helcmanovsky</reporter>
                        <labels>
                    </labels>
                <created>Mon, 6 Sep 2010 10:50:54 +0000</created>
                <updated>Wed, 8 Sep 2010 07:21:42 +0000</updated>
                                    <version>1.2.2</version>
                <version>1.2.3</version>
                                                <component>Migrations</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="14284" author="ped" created="Mon, 6 Sep 2010 10:53:16 +0000"  >&lt;p&gt;Another potentional fix is to not copy model files into temp dir, but generate YAML from them, and then generate prefixed models trough YAML code path.&lt;br/&gt;
Doesn&apos;t sound effective, but as long as YAML path will be fixed, it may work?&lt;/p&gt;</comment>
                    <comment id="14306" author="ped" created="Wed, 8 Sep 2010 07:21:28 +0000"  >&lt;p&gt;One more idea for how it can be done ( ? ):&lt;br/&gt;
to create temporary php script in temp dir together with &lt;em&gt;from&lt;/em&gt; model files, run it, let it generate $fromInfo data, serialize them on disk, do the same with &lt;em&gt;to&lt;/em&gt; models and get another serialized data, then load those files into $fromInfo and $toInfo and do the actual diffing.&lt;/p&gt;

&lt;p&gt;The point is that by running the small temporary script in new process it would be able to load model files from disk as classes without prefixing/changing them, create the $info data, and exit, so the newer classes with same name can be loaded again in the another new thread. The diff then has to live with serialized $info data only without loading model classes.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10775" name="Doc1_migration_model_loading_bug.zip" size="2700" author="ped" created="Mon, 6 Sep 2010 10:50:54 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-1037] Migration does not quote identifiers when checking migration version</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-1037</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;I happen to be using Symfony 1.4.14-DEV (r33007) and am trying to setup migrations with Oracle, which is using &lt;tt&gt;Doctrine_Core::ATTR_QUOTE_IDENTIFIER&lt;/tt&gt;. This issue is in core Doctrine.&lt;/p&gt;

&lt;p&gt;To reproduce:&lt;/p&gt;

&lt;p&gt;1. Make a change to your schema.yml&lt;br/&gt;
2. Create the migrations diff by executing &lt;tt&gt;php symfony doctrine:generate-migrations-diff&lt;/tt&gt;&lt;br/&gt;
3. New file have been created at ./lib/migration/doctrine/*_version1.php&lt;br/&gt;
4. Try to migrate using command &lt;tt&gt;php symfony doctrine:migrate&lt;/tt&gt;&lt;br/&gt;
5. Results in error:&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;ORA-00942: table or view does not exist : SELECT version FROM migration_version. Failing Query: &lt;span class=&quot;code-quote&quot;&gt;&quot;SELECT version FROM migration_version&quot;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Cause: The current connection is using quoted identifiers, so the query used to create the &lt;tt&gt;migration_version&lt;/tt&gt; table when migrations are first instantiated was properly created as &lt;tt&gt;&quot;migration_version&quot;&lt;/tt&gt; (notice quotes). But the raw SQL query used in &lt;tt&gt;Doctrine_Migration::getCurrentVersion()&lt;/tt&gt; is not quoting the table or column identifiers, so Oracle can&apos;t find the table.&lt;/p&gt;

&lt;p&gt;There are several places in &lt;tt&gt;Doctrine_Migration&lt;/tt&gt; where the table and column identifiers are not quoted, thus breaking migrations when using a database with strict rules on the case of identifiers.&lt;/p&gt;

&lt;p&gt;Even though I&apos;m developing against Oracle, this also likely affects other drivers.&lt;/p&gt;</description>
                <environment>Linux version 2.4.21-63.ELsmp (&lt;a href=&apos;mailto:mockbuild@x86-005.build.bos.redhat.com&apos;&gt;mockbuild@x86-005.build.bos.redhat.com&lt;/a&gt;) (gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-59)) #1 SMP Wed Oct 28 23:15:46 EDT 2009, Symfony 1.4.14-DEV, Oracle 11g</environment>
            <key id="13003">DC-1037</key>
            <summary>Migration does not quote identifiers when checking migration version</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="jwage">Jonathan H. Wage</assignee>
                                <reporter username="johnkary">John Kary</reporter>
                        <labels>
                    </labels>
                <created>Wed, 7 Sep 2011 19:34:51 +0000</created>
                <updated>Wed, 7 Sep 2011 20:13:23 +0000</updated>
                                    <version>1.2.3</version>
                <version>1.2.4</version>
                                                <component>Migrations</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16451" author="johnkary" created="Wed, 7 Sep 2011 20:13:23 +0000"  >&lt;p&gt;Pull request open which quotes all identifiers in Doctrine_Migration and fixes this issue:&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/doctrine1/pull/41&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine1/pull/41&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-1030] [PATCH] doctrine 1.2.4 ADD/DROP CONSTRAINT UNIQUE</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-1030</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;Adding/dropping UNIQUE CONSTRAINT doesn&apos;t work on PostgreSQL.&lt;/p&gt;

&lt;p&gt;I&apos;m attaching patch for this problem.&lt;/p&gt;

&lt;p&gt;Best regards,&lt;br/&gt;
Michal&lt;/p&gt;</description>
                <environment></environment>
            <key id="12935">DC-1030</key>
            <summary>[PATCH] doctrine 1.2.4 ADD/DROP CONSTRAINT UNIQUE</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="jwage">Jonathan H. Wage</assignee>
                                <reporter username="m">MichalKJP</reporter>
                        <labels>
                    </labels>
                <created>Fri, 19 Aug 2011 12:02:34 +0000</created>
                <updated>Fri, 19 Aug 2011 12:02:34 +0000</updated>
                                                                    <component>Migrations</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                    <attachment id="11057" name="symfony_0010_doctrine_fix_unique_add_drop.patch" size="1339" author="m" created="Fri, 19 Aug 2011 12:02:34 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-1022] Doctrine migration does not set version when MySQL autocommit is false</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-1022</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;With autocommit set to off in mysqld, &lt;tt&gt;Doctrine_Migration::setCurrentVersion()&lt;/tt&gt; does not have any effect.  This is because the method uses raw PDO calls, which are discarded without either autocommit or an explicit &lt;tt&gt;COMMIT;&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;We patched Doctrine as in the attachment.  It works for us, but may not be the best general solution.&lt;/p&gt;

&lt;p&gt;The patch only fixes this one issue.  There are likely many areas in Doctrine that rely upon autocommit behavior in MySQL.  We will continue to look for them, and supply patches as we find them.  However, as we are only concerned about MySQL, our solutions will probably not apply to other PDO drivers.&lt;/p&gt;</description>
                <environment>RHEL 6.0, mysql 5.1.52</environment>
            <key id="12856">DC-1022</key>
            <summary>Doctrine migration does not set version when MySQL autocommit is false</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="jwage">Jonathan H. Wage</assignee>
                                <reporter username="afineman">Adam Fineman</reporter>
                        <labels>
                    </labels>
                <created>Tue, 26 Jul 2011 01:02:48 +0000</created>
                <updated>Tue, 26 Jul 2011 01:41:01 +0000</updated>
                                                    <fixVersion>1.2.4</fixVersion>
                                <component>Migrations</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                    <attachment id="11040" name="migration.patch" size="501" author="afineman" created="Tue, 26 Jul 2011 01:02:48 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-988] migrations should allow generation of SQL in place of DB manipulation</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-988</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;At present migrations only allow for direct manipulation of the underlying database. However, many enterprise release processes disallow automated manipulation of databases (especially Oracle) due to a number of reasons (eg placing different objects in different table spaces). &lt;/p&gt;

&lt;p&gt;Because of this, it is preferable for developers to auto generate SQL and then hand over the specialist DBAs who may then filter/alter as needed on a per-environment basis.&lt;/p&gt;

&lt;p&gt;this is currently very easy to achieve with initial database query generation, as outputting SQL is an option, but there is no such option for migration scripts. Therefore I would like to request this option to be added to the migration class.&lt;/p&gt;</description>
                <environment></environment>
            <key id="12482">DC-988</key>
            <summary>migrations should allow generation of SQL in place of DB manipulation</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="jwage">Jonathan H. Wage</assignee>
                                <reporter username="temperedvision">David Dixon</reporter>
                        <labels>
                    </labels>
                <created>Mon, 21 Mar 2011 12:44:19 +0000</created>
                <updated>Mon, 21 Mar 2011 12:44:19 +0000</updated>
                                    <version>1.2.3</version>
                                                <component>Migrations</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-986] createIndexSql and dropConstant do not correct set index name suffix</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-986</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;Current export methods are inconsitent with index/constraint name suffix (defautl %_idx). Both createConstraintSql() and dropIndex() methods correctly set the suffix, but dropConstraint() and createIndexSql() do not.&lt;/p&gt;

&lt;p&gt;this causes associated down() methods to fail when reverting changes to indexes/constraints&lt;/p&gt;

&lt;p&gt;Erros occur in : Export.php - lines 137 and 473&lt;/p&gt;</description>
                <environment>linux, oracle</environment>
            <key id="12480">DC-986</key>
            <summary>createIndexSql and dropConstant do not correct set index name suffix</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="jwage">Jonathan H. Wage</assignee>
                                <reporter username="temperedvision">David Dixon</reporter>
                        <labels>
                    </labels>
                <created>Mon, 21 Mar 2011 12:17:26 +0000</created>
                <updated>Wed, 23 Mar 2011 10:52:48 +0000</updated>
                                    <version>1.2.3</version>
                                                <component>Migrations</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-985] doctrine migration does not use tblname_format</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-985</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;Migration commands update the database without correcting the default tablename using pre-set tblename_format parameters in databases.yml.&lt;/p&gt;

&lt;p&gt;There is a method for updating the tablename, but this appears to not be used by any script.&lt;/p&gt;</description>
                <environment>linux, oracle</environment>
            <key id="12479">DC-985</key>
            <summary>doctrine migration does not use tblname_format</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="jwage">Jonathan H. Wage</assignee>
                                <reporter username="temperedvision">David Dixon</reporter>
                        <labels>
                    </labels>
                <created>Mon, 21 Mar 2011 12:13:28 +0000</created>
                <updated>Mon, 21 Mar 2011 12:13:28 +0000</updated>
                                    <version>1.2.3</version>
                                                <component>Migrations</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-440] doctrine migration fails with taggable extension</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-440</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;When adding the Taggable behaviour to an entity, the doctrine migration fails (i&apos;m using the symfony task) with the follwing error:&lt;/p&gt;

&lt;p&gt;&amp;gt;&amp;gt; doctrine  Migrating from version 0 to 1&lt;/p&gt;

&lt;p&gt;  The following errors occurred:                                                                                                                                           &lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;SQLSTATE&lt;span class=&quot;error&quot;&gt;&amp;#91;23000&amp;#93;&lt;/span&gt;: Integrity constraint violation: 1217 Cannot delete or update a parent row: a foreign key constraint fails. Failing Query: &quot;DROP TABLE taggable_tag&quot;&lt;/li&gt;
&lt;/ul&gt;



&lt;p&gt;I have a single entity in my schema, with the Taggable behavior attached:&lt;/p&gt;

&lt;p&gt;Article:&lt;br/&gt;
  actAs:&lt;br/&gt;
    Taggable: ~&#160;&lt;br/&gt;
  columns:&lt;br/&gt;
    title:              &lt;/p&gt;
{ type: string(255), notnull: true }
&lt;p&gt;    body:               &lt;/p&gt;
{ type: clob }

&lt;p&gt;The Version1 class which was generate by the generate-migrations-diff task looks like this:&lt;/p&gt;

&lt;p&gt;&amp;lt;?php&lt;br/&gt;
/**&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;This class has been auto-generated by the Doctrine ORM Framework&lt;br/&gt;
 */&lt;br/&gt;
class Version1 extends Doctrine_Migration_Base&lt;br/&gt;
{&lt;br/&gt;
    public function up()
    {
        $this-&amp;gt;dropTable(&apos;taggable_tag&apos;);
    }&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;    public function down()&lt;/p&gt;
    {
        $this-&amp;gt;createTable(&apos;taggable_tag&apos;, array(
             &apos;id&apos; =&amp;gt; 
             array(
              &apos;type&apos; =&amp;gt; &apos;integer&apos;,
              &apos;length&apos; =&amp;gt; &apos;8&apos;,
              &apos;autoincrement&apos; =&amp;gt; &apos;1&apos;,
              &apos;primary&apos; =&amp;gt; &apos;1&apos;,
             ),
             &apos;name&apos; =&amp;gt; 
             array(
              &apos;unique&apos; =&amp;gt; &apos;1&apos;,
              &apos;type&apos; =&amp;gt; &apos;string&apos;,
              &apos;length&apos; =&amp;gt; &apos;255&apos;,
             ),
             ), array(
             &apos;type&apos; =&amp;gt; &apos;&apos;,
             &apos;indexes&apos; =&amp;gt; 
             array(
             ),
             &apos;primary&apos; =&amp;gt; 
             array(
              0 =&amp;gt; &apos;id&apos;,
             ),
             &apos;collate&apos; =&amp;gt; &apos;&apos;,
             &apos;charset&apos; =&amp;gt; &apos;&apos;,
             ));
    }
&lt;p&gt;}&lt;/p&gt;</description>
                <environment>osx 10.6, apache 2, php 5.3, symfony 1.4</environment>
            <key id="10753">DC-440</key>
            <summary>doctrine migration fails with taggable extension</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="jwage">Jonathan H. Wage</assignee>
                                <reporter username="pulse00">Robert Gruendler</reporter>
                        <labels>
                    </labels>
                <created>Wed, 20 Jan 2010 19:42:50 +0000</created>
                <updated>Fri, 22 Jan 2010 11:18:02 +0000</updated>
                                    <version>1.2.0</version>
                <version>1.2.1</version>
                                                <component>Extensions</component>
                <component>Migrations</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="11443" author="pulse00" created="Fri, 22 Jan 2010 11:17:38 +0000"  >&lt;p&gt;i think i found the reason for this. The sfDoctrineGenerateMigrationsDiffTask seems to build it&apos;s diff from yml schema files:&lt;/p&gt;

&lt;p&gt;protected function execute()....&lt;/p&gt;

&lt;p&gt;$this-&amp;gt;callDoctrineCli(&apos;generate-migrations-diff&apos;, array(&lt;br/&gt;
      &apos;yaml_schema_path&apos; =&amp;gt; $this-&amp;gt;prepareSchemaFile($config&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;yaml_schema_path&amp;#39;&amp;#93;&lt;/span&gt;),&lt;br/&gt;
    ));&lt;/p&gt;


&lt;p&gt;The task does not know anything about the models in the doctrine_extensions folder, and there are no yaml files for their&lt;br/&gt;
schema, so symfony migration tasks won&apos;t work with extensions.&lt;/p&gt;

&lt;p&gt;It would be great if this would be mentioned somewhere in the docs of the extensions.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-383] Migrations not respecting ATTR_TBLNAME_FORMAT</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-383</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;I am using Doctrine 1.2.1 and Migrations don&apos;t appear to respect Doctrine::ATTR_TBLNAME_FORMAT when creating or dropping tables.  This means while models create/drop tables with prefixes migrations don&apos;t.  Also the migration_version table is created without the prefix too even though it was apparently fixed in &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DC-245&quot; title=&quot;Table name prefix for table migration_version&quot;&gt;&lt;del&gt;DC-245&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I haven&apos;t tested but it also probably means other attributes like Doctrine::ATTR_IDXNAME_FORMAT and Doctrine::ATTR_SEQNAME_FORMAT are not obeyed either which makes things a little confusing knowing when to care for prefixes or not.&lt;/p&gt;</description>
                <environment>Debian 5, Apache 2, PHP 5.2.9, MySQL 5.1</environment>
            <key id="10658">DC-383</key>
            <summary>Migrations not respecting ATTR_TBLNAME_FORMAT</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="jwage">Jonathan H. Wage</assignee>
                                <reporter username="drak">Karma Dordrak (Drak)</reporter>
                        <labels>
                    </labels>
                <created>Wed, 23 Dec 2009 13:25:38 +0000</created>
                <updated>Fri, 28 May 2010 06:13:28 +0000</updated>
                                    <version>1.2.1</version>
                                                <component>Attributes</component>
                <component>Migrations</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="13075" author="eman" created="Fri, 28 May 2010 06:13:28 +0000"  >&lt;p&gt;Simple patch to set the table name inside constructor&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10615" name="migration_table_prefix_doctrine_1.2.patch" size="424" author="eman" created="Fri, 28 May 2010 06:13:28 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-667] migration fails for long foreign key names</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-667</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;When having a model with short name and i18n field which is versioned, everthing is right. There are no problems when doing diff and migration again and again. Nothing will happen because nothing changed.&lt;br/&gt;
For example: &lt;br/&gt;
mytest:&lt;br/&gt;
  actAs:&lt;br/&gt;
    I18n:&lt;br/&gt;
      fields:         [ description_front ]  &lt;br/&gt;
      actAs:  &lt;br/&gt;
        Timestampable:  &lt;br/&gt;
        Versionable:           &lt;br/&gt;
  columns:&lt;br/&gt;
    title: &lt;/p&gt;
{type: string(255)}
&lt;p&gt;    description_front: &lt;/p&gt;
{type: string(255)}

&lt;p&gt;But when using a longer model name like &apos;mytestmytestmytest&apos; then some strange errors occurred in my simple example. After creating the &apos;translation&apos; and &apos;transalation_version&apos; table in &apos;1273139712_version2.php&apos; and creating the foreign keys in &apos;1273139713_version3.php&apos; there shouldn&apos;d be a &apos;1273146011_version4.php&apos; generated by doing a diff, because everthing was already done. And of course when doing a migration with this last version, you will get errors. &lt;/p&gt;</description>
                <environment>CentOS release 5.4 (Final)&lt;br/&gt;
&lt;br/&gt;
Linux xxx 2.6.18-164.10.1.el5 #1 SMP Thu Jan 7 20:00:41 EST 2010 i686 athlon i386 GNU/Linux&lt;br/&gt;
&lt;br/&gt;
PHP 5.3.2 (cli) (built: Mar  4 2010 21:52:46)&lt;br/&gt;
Copyright (c) 1997-2010 The PHP Group&lt;br/&gt;
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies&lt;br/&gt;
&lt;br/&gt;
MySQL Server version: 5.1.42-log MySQL Community Server (GPL)&lt;br/&gt;
&lt;br/&gt;
&lt;br/&gt;
</environment>
            <key id="11321">DC-667</key>
            <summary>migration fails for long foreign key names</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="jwage">Jonathan H. Wage</assignee>
                                <reporter username="mweber">Michael Weber</reporter>
                        <labels>
                    </labels>
                <created>Thu, 6 May 2010 09:19:20 +0000</created>
                <updated>Thu, 6 May 2010 09:19:20 +0000</updated>
                                    <version>1.2.2</version>
                                                <component>Migrations</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                    <attachment id="10593" name="doctrine_test.zip" size="760651" author="mweber" created="Thu, 6 May 2010 09:19:20 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-617] migration problem</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-617</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;I attached a testcase that reproduces all problem that I noticed (previously reported in &quot;serious symfony doctrine:migrate issues - symfony 1.4&quot; on symfony-dev)&lt;/p&gt;

&lt;p&gt;There is a problem with an empty ON UPDATE when migrate to version 5&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;SQLSTATE&lt;span class=&quot;error&quot;&gt;&amp;#91;42601&amp;#93;&lt;/span&gt;: Syntax error: 7 B&#321;&#260;D:  b&#322;&#261;d sk&#322;adni w lub blisko &quot;ON&quot;&lt;br/&gt;
LINE 1: ... (object_c_id) REFERENCES object_c(id) ON UPDATE  ON DELETE ...&lt;br/&gt;
                                                             ^. Failing Query: &quot;ALTER TABLE object_b ADD CONSTRAINT object_b_object_c_id_object_c_id FOREIGN KEY (object_c_id) REFERENCES object_c(id) ON UPDATE  ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE&quot;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;When  migrateing from 5 to 3&lt;br/&gt;
Failing Query: &quot;DROP INDEX object_b_object_c_id_idx&quot; - this index doesn&apos;t exist - should be &quot;object_b_object_c_id&quot;&lt;/p&gt;

&lt;p&gt;Also&lt;br/&gt;
        $this-&amp;gt;changeColumn(&apos;object_a&apos;, &apos;name&apos;, &apos;string&apos;, &apos;2048&apos;, array(&lt;br/&gt;
             ));&lt;br/&gt;
        $this-&amp;gt;changeColumn(&apos;object_b&apos;, &apos;name&apos;, &apos;string&apos;, &apos;2048&apos;, array(&lt;br/&gt;
             ));&lt;br/&gt;
doesn&apos;t work for me&lt;/p&gt;</description>
                <environment>Symfony 1.4.3, Linux, PostgreSQL, Pgpool II</environment>
            <key id="11177">DC-617</key>
            <summary>migration problem</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="jwage">Jonathan H. Wage</assignee>
                                <reporter username="m">MichalKJP</reporter>
                        <labels>
                    </labels>
                <created>Tue, 6 Apr 2010 12:07:49 +0000</created>
                <updated>Fri, 22 Jun 2012 14:01:48 +0000</updated>
                                    <version>1.2.1</version>
                                                <component>Migrations</component>
                        <due></due>
                    <votes>2</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="14308" author="ludo.fleury" created="Wed, 8 Sep 2010 10:27:25 +0000"  >&lt;p&gt;My own Quick Fix for  DROP INDEX (into Export class)&lt;br/&gt;
Skip Formatter-&amp;gt;getIndexName() in Export-&amp;gt;dropIndex()&lt;br/&gt;
see : &lt;a href=&quot;http://www.pastie.org/1145916&quot; class=&quot;external-link&quot;&gt;http://www.pastie.org/1145916&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="14309" author="m" created="Wed, 8 Sep 2010 10:38:12 +0000"  >&lt;p&gt;I already tested this solution and I can confirm that also works for me.&lt;/p&gt;

&lt;p&gt;I am afraid that Johnatan spends much time on the new version and did not have time to correct these bugs for the old version. So we still repair migrations manualy.&lt;/p&gt;</comment>
                    <comment id="18131" author="sarcas" created="Fri, 22 Jun 2012 14:01:48 +0000"  >&lt;p&gt;We&apos;ve had this issue for a while - while Ludo&apos;s fix does work, there is an SQL injection issue in that the &apos;$name&apos; doesn&apos;t get escaped.&lt;/p&gt;

&lt;p&gt;You can do this:  $name = $this-&amp;gt;conn-&amp;gt;quoteIdentifier($name); which also steps around the issue for now.&lt;/p&gt;

&lt;p&gt;The problem appears to be that the indexes &lt;b&gt;aren&apos;t&lt;/b&gt; being created with the _idx string on the end when using the migrations. This is probably down to the index creation process rather than the index removal process.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10545" name="testcase.tar.bz2" size="49650" author="m" created="Tue, 6 Apr 2010 12:07:49 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-834] When altering an existing column PGSQL can&apos;t convert to SERIAL for autoincrement</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-834</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;If you have an existing column Postgresql won&apos;t allow you to use the type SERIAL for altering the column.&lt;/p&gt;

&lt;p&gt;First create a column cat_id on category of integer type. Then run the following migration:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeHeader panelHeader&quot; style=&quot;border-bottom-width: 1px;&quot;&gt;&lt;b&gt;migration.php&lt;/b&gt;&lt;/div&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 up()
    {
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;changeColumn(&apos;category&apos;, &apos;cat_id&apos;, &apos;integer&apos;, &apos;4&apos;, array(
             &apos;unsigned&apos; =&amp;gt; &apos;&apos;,
             &apos;primary&apos; =&amp;gt; &apos;1&apos;,
             &apos;autoincrement&apos; =&amp;gt; &apos;1&apos;,
             ));
    }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;b&gt;Instead of using type SERIAL doctrine would have to simply alter the column then add a sequence on it&apos;s own.&lt;/b&gt;&lt;/p&gt;</description>
                <environment>PostgreSQL 8.4</environment>
            <key id="11796">DC-834</key>
            <summary>When altering an existing column PGSQL can&apos;t convert to SERIAL for autoincrement</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="jwage">Jonathan H. Wage</assignee>
                                <reporter username="webpragmatist">webPragmatist</reporter>
                        <labels>
                    </labels>
                <created>Wed, 18 Aug 2010 12:36:45 +0000</created>
                <updated>Wed, 18 Aug 2010 12:36:45 +0000</updated>
                                    <version>1.2.2</version>
                                                <component>Attributes</component>
                <component>Migrations</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-830] Migration for up() not adding suffix for index</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-830</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;I am still getting the same issue as previously closed a while ago on trac &lt;a href=&quot;http://trac.doctrine-project.org/ticket/1964&quot; class=&quot;external-link&quot;&gt;http://trac.doctrine-project.org/ticket/1964&lt;/a&gt;&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeHeader panelHeader&quot; style=&quot;border-bottom-width: 1px;&quot;&gt;&lt;b&gt;migration.php&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;&amp;lt;?php
/**
 * This class has been auto-generated by the Doctrine ORM Framework
 */
class Add_Category_Slug_Index &lt;span class=&quot;code-keyword&quot;&gt;extends&lt;/span&gt; Doctrine_Migration_Base
{
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function up()
    {
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;addIndex(&apos;category&apos;, &apos;category_sluggable&apos;, array(
             &apos;fields&apos; =&amp;gt; 
             array(
              0 =&amp;gt; &apos;slug&apos;,
             ),
             &apos;type&apos; =&amp;gt; &apos;unique&apos;,
             ));
    }

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function down()
    {
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;removeIndex(&apos;category&apos;, &apos;category_sluggable&apos;, array(
             &apos;fields&apos; =&amp;gt; 
             array(
              0 =&amp;gt; &apos;slug&apos;,
             ),
             &apos;type&apos; =&amp;gt; &apos;unique&apos;,
             ));
    }
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The above migration generates an index named &lt;b&gt;category_sluggable&lt;/b&gt; instead of  &lt;b&gt;category_sluggable_idx&lt;/b&gt;&lt;/p&gt;</description>
                <environment>Postgresql 8.4 / Symfony 1.4.6</environment>
            <key id="11780">DC-830</key>
            <summary>Migration for up() not adding suffix for index</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="jwage">Jonathan H. Wage</assignee>
                                <reporter username="webpragmatist">webPragmatist</reporter>
                        <labels>
                    </labels>
                <created>Mon, 16 Aug 2010 17:05:06 +0000</created>
                <updated>Sat, 21 Aug 2010 07:06:10 +0000</updated>
                                    <version>1.2.2</version>
                                                <component>Migrations</component>
                        <due></due>
                    <votes>2</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="13968" author="webpragmatist" created="Mon, 16 Aug 2010 17:57:53 +0000"  >&lt;p&gt;If I change the name in the up() to &lt;b&gt;category_sluggable_idx&lt;/b&gt; both up and down work properly.&lt;/p&gt;</comment>
                    <comment id="14023" author="argasek" created="Sat, 21 Aug 2010 07:06:10 +0000"  >&lt;p&gt;Confirming. I had the same problem last week and as a workaround I had to change suffix from &quot;%s_idx&quot; to &quot;%s&quot;. Even if the bug is not reproducible in a test case, it indeed happens in live environment on PostgreSQL (in my case, Symphony is not used).&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-827] Custom Doctrine_Query UPDATE statement inside migration scope not working</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-827</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;I found strange problem in Doctrine migration. I tried to execute custom DQL in migration. Custom query with SELECT statement  succeed, but UPDATE query not changed any data in DB and do not returned back any error message.  After I tried execute same code in CLI task. Worked well and data in database was updated as I expected.  So looks like Doctrine_Query do not works well inside migration scope with UPDATE statement.&lt;/p&gt;

&lt;p&gt;... or maybe  I do something wrong? If did something maybe you have to put in manual how to use custom DQL in migrations correctly. I hope migrations are not only to change structure of tables, but also can be used to change data structure too. &lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt; 
public function up() {

$conn = Doctrine_Manager::connection();  	  	
  	
$brands = Doctrine_Query::create ($conn)
  		-&amp;gt;select(&apos;b.id, b.name&apos;)
  		-&amp;gt;from(&apos;Brand b&apos;)
  		-&amp;gt;fetchArray();  // this query worked for me well. I have data
  		 	  	  	 	  	
foreach ($brands as $brand) {
  Doctrine_Query::create ($conn)
   	-&amp;gt;update(&apos;Brand&apos;)
  	-&amp;gt;set(&apos;safe_name&apos;, &apos;?&apos;, &apos;some_safe_name&apos;)
  	-&amp;gt;where(&apos;id = ?&apos;, $brand[&apos;id&apos;])
  	-&amp;gt;execute(); // this query was executed but not had any effect on data in DB
 }
//........
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; </description>
                <environment>Symfony Framework 1.3&lt;br/&gt;
Zend Server CE 5.0.2  (PHP 5.3.2)&lt;br/&gt;
Apache 2.2&lt;br/&gt;
MySQL 5.1.47&lt;br/&gt;
Windows XP </environment>
            <key id="11772">DC-827</key>
            <summary>Custom Doctrine_Query UPDATE statement inside migration scope not working</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="jwage">Jonathan H. Wage</assignee>
                                <reporter username="arnlukas">Arnoldas Lukasevicius</reporter>
                        <labels>
                    </labels>
                <created>Sat, 14 Aug 2010 13:48:18 +0000</created>
                <updated>Tue, 2 Nov 2010 06:28:34 +0000</updated>
                                    <version>1.2.2</version>
                                                <component>Migrations</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-768] Renaming a NOT NULL column without a default value fails in MySQL migrations</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-768</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;When trying to rename a column that is NOT NULL and has no default value, Doctrine generates this SQL:&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;ALTER TABLE `article` CHANGE `typeid` `listid` INT DEFAULT NULL NOT NULL&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Which fails. It should be:&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;ALTER TABLE `article` CHANGE `typeid` `listid` INT NOT NULL&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="11555">DC-768</key>
            <summary>Renaming a NOT NULL column without a default value fails in MySQL migrations</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="jwage">Jonathan H. Wage</assignee>
                                <reporter username="jacksleight">Jack Sleight</reporter>
                        <labels>
                    </labels>
                <created>Fri, 25 Jun 2010 15:26:49 +0000</created>
                <updated>Fri, 28 Jan 2011 10:29:50 +0000</updated>
                                    <version>1.2.2</version>
                                                <component>Migrations</component>
                        <due></due>
                    <votes>2</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="15125" author="mhughes" created="Tue, 11 Jan 2011 14:39:20 +0000"  >&lt;p&gt;can confirm this behaviour on mysql w/ 1.2.4&lt;/p&gt;</comment>
                    <comment id="15196" author="mhughes" created="Fri, 28 Jan 2011 10:29:50 +0000"  >&lt;p&gt;Attached is a patch that solves the issue.&lt;br/&gt;
It&apos;s not the most elegan solution.&lt;br/&gt;
But works and all tests pass.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10922" name="DC-768.patch" size="1602" author="mhughes" created="Fri, 28 Jan 2011 10:29:50 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-753] doctrine generate-migrations-diff throws &quot;No php or yml files found at path&quot;</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-753</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;I am trying to generate migrations from the CLI but I get the error mentioned in the title. I did some searching and this seems to &lt;b&gt;have been&lt;/b&gt; a known problem and was fixed, however, I&apos;m getting it and the path is correct, and there is even a schema.yml file I just generated, also through CLI.&lt;/p&gt;

&lt;p&gt;Here is the error:&lt;/p&gt;

&lt;p&gt;D:\wamp\www\project\src\administrator\components\com_project\doctrine&amp;gt;php doctrine generate-migrations-diff&lt;br/&gt;
No php or yml files found at path: &quot;D:\wamp\www\project\src\administrator\components\com_project\doctrine\schema&quot;&lt;/p&gt;

&lt;p&gt;And here is what I have in my CLI file:&lt;/p&gt;

&lt;p&gt;	require_once(&apos;../../../../libraries/doctrine/lib/Doctrine.php&apos;);&lt;/p&gt;

&lt;p&gt;	spl_autoload_register(array(&apos;Doctrine&apos;,&apos;autoload&apos;));&lt;/p&gt;

&lt;p&gt;	Doctrine_Manager::connection(&apos;mysql://root@localhost/project&apos;,&apos;default&apos;);&lt;/p&gt;

&lt;p&gt;	//Doctrine_Manager::getInstance()-&amp;gt;setAttribute(Doctrine::ATTR_TBLNAME_FORMAT, &apos;jos_project_%s&apos;);&lt;br/&gt;
	Doctrine_Manager::getInstance()-&amp;gt;setAttribute(Doctrine::ATTR_VALIDATE, Doctrine::VALIDATE_ALL);&lt;br/&gt;
	Doctrine_Manager::getInstance()-&amp;gt;setAttribute(Doctrine::ATTR_QUOTE_IDENTIFIER, true);&lt;br/&gt;
	Doctrine::loadModels(&apos;models/generated&apos;);&lt;br/&gt;
	Doctrine::loadModels(&apos;models&apos;);&lt;/p&gt;

&lt;p&gt;	$cli = new Doctrine_Cli(array(&lt;br/&gt;
		&apos;data_fixtures_path&apos;  =&amp;gt;  dirname(_&lt;em&gt;FILE&lt;/em&gt;_).DIRECTORY_SEPARATOR.&apos;fixtures&apos;,&lt;br/&gt;
		&apos;models_path&apos;         =&amp;gt;  dirname(_&lt;em&gt;FILE&lt;/em&gt;_).DIRECTORY_SEPARATOR.&apos;models&apos;,&lt;br/&gt;
		&apos;migrations_path&apos;     =&amp;gt;  dirname(_&lt;em&gt;FILE&lt;/em&gt;_).DIRECTORY_SEPARATOR.&apos;migrations&apos;,&lt;br/&gt;
		&apos;sql_path&apos;            =&amp;gt;  dirname(_&lt;em&gt;FILE&lt;/em&gt;_).DIRECTORY_SEPARATOR.&apos;sql&apos;,&lt;br/&gt;
		&apos;yaml_schema_path&apos;    =&amp;gt;  dirname(_&lt;em&gt;FILE&lt;/em&gt;_).DIRECTORY_SEPARATOR.&apos;schema&apos;&lt;br/&gt;
	));&lt;/p&gt;

&lt;p&gt;	$cli-&amp;gt;run($_SERVER&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;argv&amp;#39;&amp;#93;&lt;/span&gt;);&lt;/p&gt;

&lt;p&gt;I find this very weird because earlier today I was able to make a migration the same way but with Symfony&apos;s CLI, however, that is another project.&lt;/p&gt;

&lt;p&gt;Regards,&lt;/p&gt;

&lt;p&gt;David&lt;/p&gt;</description>
                <environment>WIndows 7 x64, WAMP, PHP 5.2.11 &amp;amp; 5.3</environment>
            <key id="11524">DC-753</key>
            <summary>doctrine generate-migrations-diff throws &quot;No php or yml files found at path&quot;</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="jwage">Jonathan H. Wage</assignee>
                                <reporter username="dukeofgaming">David Vega</reporter>
                        <labels>
                    </labels>
                <created>Sat, 19 Jun 2010 05:12:50 +0000</created>
                <updated>Thu, 27 Jan 2011 13:07:37 +0000</updated>
                                    <version>1.2.2</version>
                                <fixVersion>1.2.2</fixVersion>
                                <component>Migrations</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="15194" author="saldanha" created="Thu, 27 Jan 2011 13:07:37 +0000"  >&lt;p&gt;I have the same problem, using symfony 1.4 latest sources. After reading about 20 (long) pages about similar issues, I&apos;ve come up with a solution.&lt;/p&gt;

&lt;p&gt;The problem appears when the project still don&apos;t have any Models defined. Im my case, they were all new projects in the plugin activation stage. Curiously, the behaviour were random, as in some projects I could activate my Contacts plugin (the first), and in others I couldn&apos;t.&lt;/p&gt;

&lt;p&gt;After much consideration, the problem was that the var $extension in /doctrine/Doctrine/Migration/Diff.php was empty, and that was because the algorithm only considered the first entry of the directory. If it was a file, its extension was used. If not, the algorithm descended until it found a file as the first entry. BUT it never considered second (and following) entries, so as my first entry was the &apos;base&apos; directory, and it was empty, no extension was ever found. This probably will not happen if the project have some models defined.&lt;/p&gt;

&lt;p&gt;And so, I came up with a solution. In doctrine/Doctrine/Migration/Diff.php, enclose this code in the _getItemExtension method (near line 350, in my copy) with a loop, such as:&lt;br/&gt;
      $idx = 0;&lt;br/&gt;
      while (strlen($extension) == 0) {&lt;br/&gt;
          if (isset($files&lt;span class=&quot;error&quot;&gt;&amp;#91;$idx&amp;#93;&lt;/span&gt;)) {&lt;br/&gt;
              if (is_dir($files&lt;span class=&quot;error&quot;&gt;&amp;#91;$idx&amp;#93;&lt;/span&gt;)) &lt;/p&gt;
{
                  $extension = $this-&amp;gt;_getItemExtension($files[$idx]);
              }
&lt;p&gt; else &lt;/p&gt;
{
                  $pathInfo = pathinfo($files[$idx]);
                  $extension = $pathInfo[&apos;extension&apos;];
              }
&lt;p&gt;              $idx++;&lt;br/&gt;
          }&lt;br/&gt;
          else break; // no more entries to seek&lt;br/&gt;
      }&lt;/p&gt;

&lt;p&gt;Now it keep looking in every folder until it finds a file WITH an extension, and stops when all the tree is searched.&lt;/p&gt;

&lt;p&gt;Hope that helps someone.&lt;/p&gt;

&lt;p&gt;best regards.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-750] migration error when deleting 2 or more related classes</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-750</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;That&apos;s my relevant schema.yml before changes:&lt;/p&gt;

&lt;p&gt;Customer:&lt;br/&gt;
  columns:&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;..&amp;#93;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;CustomerPlace:&lt;br/&gt;
  columns:&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;..&amp;#93;&lt;/span&gt;&lt;br/&gt;
  relations:&lt;br/&gt;
    Customer:&lt;br/&gt;
      local:                customer_id&lt;br/&gt;
      foreignAlias:         Addresses&lt;br/&gt;
      onDelete:             CASCADE&lt;/p&gt;

&lt;p&gt;CustomerPerson:&lt;br/&gt;
  columns:&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;..&amp;#93;&lt;/span&gt;&lt;br/&gt;
  relations:&lt;br/&gt;
    CustomerPlace:&lt;br/&gt;
      local:                place_id&lt;br/&gt;
      foreignAlias:         Contacts&lt;br/&gt;
      onDelete:             CASCADE&lt;/p&gt;

&lt;p&gt;I deleted all of the 3 entities, I executed symfony doctrine:generate-migrations-diff, which created the migration file containing:&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;this&lt;/span&gt;-&amp;gt;dropTable(&apos;customer&apos;);
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;dropTable(&apos;customer_person&apos;);
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;dropTable(&apos;customer_place&apos;);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Executing the migration, gave me error for constrain violation. To fix the error, I added:&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;this&lt;/span&gt;-&amp;gt;dropForeignKey(&apos;customer_person&apos;, &apos;customer_person_place_id_customer_place_id&apos;);
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;dropForeignKey(&apos;customer_place&apos;, &apos;customer_place_customer_id_customer_id&apos;);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Thanks.&lt;/p&gt;</description>
                <environment></environment>
            <key id="11517">DC-750</key>
            <summary>migration error when deleting 2 or more related classes</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="jwage">Jonathan H. Wage</assignee>
                                <reporter username="gionn">Giovanni Toraldo</reporter>
                        <labels>
                    </labels>
                <created>Thu, 17 Jun 2010 16:31:18 +0000</created>
                <updated>Thu, 1 Jul 2010 05:29:04 +0000</updated>
                                    <version>1.2.3</version>
                                                <component>Migrations</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="13480" author="gionn" created="Thu, 1 Jul 2010 05:28:45 +0000"  >&lt;p&gt;Another way for fixing this issue, could be to generate a migration class for each of the related tables, so they are executed in different transaction, so integrity constrains aren&apos;t violated.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-751] [PATCH] fix migration builder for remove index</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-751</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;remove the third argumnet it is not used/defined&lt;/p&gt;</description>
                <environment></environment>
            <key id="11519">DC-751</key>
            <summary>[PATCH] fix migration builder for remove index</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="jwage">Jonathan H. Wage</assignee>
                                <reporter username="gimler">Gordon Franke</reporter>
                        <labels>
                    </labels>
                <created>Fri, 18 Jun 2010 03:44:21 +0000</created>
                <updated>Fri, 18 Jun 2010 03:44:21 +0000</updated>
                                                                    <component>Migrations</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                    <attachment id="10670" name="remove_index.patch" size="734" author="gimler" created="Fri, 18 Jun 2010 03:44:21 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-1028] Doctrine Migrate functions for current version and for creating the migrations table</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-1028</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;I always tend to find myself needing to implement migrations after the fact. It would be really nice to have a method of having doctrine creating the migration_version table as well as a method of setting that value and getting that value.&lt;/p&gt;

&lt;p&gt;This would in-turn allow the implementation in a framework such as symfony to allow you insert the table after the fact, allow you to update the migration version without running the migration and to let you know what version you&apos;re currently on.&lt;/p&gt;</description>
                <environment></environment>
            <key id="12927">DC-1028</key>
            <summary>Doctrine Migrate functions for current version and for creating the migrations table</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</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>
                                <assignee username="jwage">Jonathan H. Wage</assignee>
                                <reporter username="isleshocky77">Stephen Ostrow</reporter>
                        <labels>
                    </labels>
                <created>Tue, 16 Aug 2011 18:54:25 +0000</created>
                <updated>Tue, 16 Aug 2011 18:54:25 +0000</updated>
                                    <version>1.2.4</version>
                                                <component>Migrations</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-597] symfony doctrine:generate-migrations-diff task doesn&apos;t take attributes into account</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-597</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;I provided the following bug report on the symfony website and was redirected here.  The response I received was:&lt;/p&gt;

&lt;p&gt;Ticket #8438 (closed defect: invalid)&lt;br/&gt;
03/20/10 12:55:04 changed by Kris.Wallsmith&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;status changed from new to closed.&lt;/li&gt;
	&lt;li&gt;resolution set to invalid.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;The symfony task is a wrapper for the Doctrine task. Please post issues to their Jira. &lt;a href=&quot;http://www.doctrine-project.org/jira&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/jira&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;------------------&lt;br/&gt;
Bug details:&lt;br/&gt;
------------------&lt;/p&gt;

&lt;p&gt;When running doctrine:generate-migrations-diff, I am receiving foreign key files. However, my schema.yml is defined as such:&lt;/p&gt;

&lt;p&gt;attributes: &lt;br/&gt;
  export: tables&lt;br/&gt;
TableOne:&lt;br/&gt;
  columns:&lt;br/&gt;
    ...&lt;br/&gt;
TableTwo:&lt;br/&gt;
  columns:&lt;br/&gt;
    ...&lt;/p&gt;

&lt;p&gt;It would appear that when running doctrine:build it properly ignores the foreign key generation, but that it does not when running doctrine:generate-migrations-diff. This task should be corrected to take this attribute into account. Keep in mind that this may be relevant to the other migration tasks, and they should be updated as well if this is a valid bug. &lt;/p&gt;</description>
                <environment>Windows 7, Apache 2.2.14, PHP 5.2.11, MySQL 5.0.86</environment>
            <key id="11116">DC-597</key>
            <summary>symfony doctrine:generate-migrations-diff task doesn&apos;t take attributes into account</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>
                                <assignee username="jwage">Jonathan H. Wage</assignee>
                                <reporter username="bobttd">Bob Stremel</reporter>
                        <labels>
                    </labels>
                <created>Tue, 23 Mar 2010 14:16:17 +0000</created>
                <updated>Tue, 8 Jun 2010 16:17:57 +0000</updated>
                                    <version>1.2.0</version>
                                                <component>Migrations</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-497] A new task to set migration to a certain version</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-497</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;It would be nice to have a task which you could tell to set to the proper version. If the migrations_version table did not exist yet, it would create the table and set the version.&lt;/p&gt;

&lt;p&gt;Explanation:&lt;br/&gt;
  Most times migrations come as an after thought after the code db is already pushed live.  Therefore you have to manually create the migrations table and set it to a version just before the newest migration.&lt;/p&gt;

&lt;p&gt;  It might also be better to just update the migrate task to check if a migration_version table exists, if not to just run the single migration which is specified.&lt;/p&gt;</description>
                <environment>All</environment>
            <key id="10880">DC-497</key>
            <summary>A new task to set migration to a certain version</summary>
                <type id="2" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</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>
                                <assignee username="romanb">Roman S. Borschel</assignee>
                                <reporter username="isleshocky77">Stephen Ostrow</reporter>
                        <labels>
                    </labels>
                <created>Fri, 12 Feb 2010 17:33:32 +0000</created>
                <updated>Sat, 13 Feb 2010 01:55:11 +0000</updated>
                                    <version>1.2.1</version>
                                                <component>Migrations</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-803] Syntax error in MySQL migration to drop constraint (patch supplied)</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-803</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;I have a migration that adds constraints correctly. When migrating down, however, I get a syntax error&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeHeader panelHeader&quot; style=&quot;border-bottom-width: 1px;&quot;&gt;&lt;b&gt;ErrorMessage&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;  Error #1 - SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; the right syntax to use near &apos;CONSTRAINT unique_username_idx&apos; at line 1. Failing Query: &lt;span class=&quot;code-quote&quot;&gt;&quot;ALTER TABLE conUser DROP CONSTRAINT unique_username_idx&quot;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Here is the down migration:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeHeader panelHeader&quot; style=&quot;border-bottom-width: 1px;&quot;&gt;&lt;b&gt;DownMigration&lt;/b&gt;&lt;/div&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 down() {
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;dropConstraint(&apos;conUser&apos;, &apos;unique_username_idx&apos;);
    }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The SQL generated is &quot;ALTER TABLE conUser &lt;b&gt;DROP CONSTRAINT&lt;/b&gt; unique_username_idx&quot;. This post (&lt;a href=&quot;http://forums.mysql.com/read.php?98,70887,70974#msg-70974&quot; class=&quot;external-link&quot;&gt;http://forums.mysql.com/read.php?98,70887,70974#msg-70974&lt;/a&gt;) suggests that in MySQL the syntax should be &quot;ALTER TABLE conUser &lt;b&gt;DROP INDEX&lt;/b&gt; unique_username_idx&quot; as constraints are basically indexes in MySQL (unlike MSSQL and Oracle). Doctrine&apos;s lib/Doctrine/Export/MySql.php appears to have a syntax error in the dropConstraint method. I attach a patch for this, but the only change is replacing &quot;$name = &apos;CONSTRAINT &apos;&quot; with &quot;$name = &apos;INDEX &apos;&quot; in dropConstraint. The migration then runs as I would expect.&lt;/p&gt;

&lt;p&gt;Sorry if this has been fixed elsewhere, I did a search but couldn&apos;t find a similar ticket.&lt;/p&gt;</description>
                <environment>Debian, PHP 5.3.2, MySQL</environment>
            <key id="11694">DC-803</key>
            <summary>Syntax error in MySQL migration to drop constraint (patch supplied)</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>
                                <assignee username="jwage">Jonathan H. Wage</assignee>
                                <reporter username="boxgav">Gavin Davies</reporter>
                        <labels>
                    </labels>
                <created>Thu, 29 Jul 2010 11:56:23 +0000</created>
                <updated>Thu, 29 Jul 2010 11:58:16 +0000</updated>
                                    <version>1.2.2</version>
                                <fixVersion>1.2.2</fixVersion>
                                <component>Migrations</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="13729" author="boxgav" created="Thu, 29 Jul 2010 11:58:16 +0000"  >&lt;p&gt;fixing syntax&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10713" name="SyntaxFixForMySQLDropConstraintInExport.patch" size="656" author="boxgav" created="Thu, 29 Jul 2010 11:56:23 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DC-767] Doctrine_Migration_Builder::generateMigrationClass() improperly loads migration class</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-767</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;in function: Doctrine_Migration_Builder::generateMigrationClass() the generated migration class is included (require_once) after creation.  A loadMigrationClass call is made following &lt;span class=&quot;error&quot;&gt;&amp;#91;line 513&amp;#93;&lt;/span&gt; as:&lt;/p&gt;

&lt;p&gt;$this-&amp;gt;migration-&amp;gt;loadMigrationClass($className);&lt;/p&gt;

&lt;p&gt;I propose this should change to include the optional &quot;$path&quot; argument to Doctrine_Migration::loadMigrationClass() as:&lt;/p&gt;

&lt;p&gt;$this-&amp;gt;migration-&amp;gt;loadMigrationClass($className, $path);&lt;/p&gt;

&lt;p&gt;Since the $path variable is available for the loadMigrationClass it should be included.  More importantly NOT including $path breaks the certains behaviors.  This occurs as a side effect in symfony for instance when creating a new task that chains:&lt;/p&gt;

&lt;p&gt;doctrine:generate-migrations-diff&lt;br/&gt;
doctrine:migrate&lt;/p&gt;

&lt;p&gt;The reason for the problem is because the generate-migrations-diff properly creates the version class and file and then has a require_once that pulls the class into scope.  doctrine:migrate then runs Doctrine_Migration::loadMigrationClassesFromDirectory() to find all the migration classes.  The task does NOT see the newly created migration class because it is not associated with the directory dirname($path) pointed out above.  The function thoroughly scans the migration class directory  with require_once and array_diff&apos;s to find new classes.  But the new migrations class is already within declaration scope so is missed.  Thus the doctrine:migrate task always migrates to the version BEFORE the executed doctrine:generate-migration-diff.&lt;/p&gt;






</description>
                <environment>N/A</environment>
            <key id="11554">DC-767</key>
            <summary>Doctrine_Migration_Builder::generateMigrationClass() improperly loads migration class</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>
                                <assignee username="jwage">Jonathan H. Wage</assignee>
                                <reporter username="bfranzke">Brandon Franzke</reporter>
                        <labels>
                    </labels>
                <created>Fri, 25 Jun 2010 11:03:13 +0000</created>
                <updated>Fri, 25 Jun 2010 11:03:13 +0000</updated>
                                    <version>1.2.2</version>
                                                <component>Migrations</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>
</channel>
</rss>