<!-- 
RSS generated by JIRA (5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5) at Thu May 23 22:23:17 UTC 2013

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

<item>
            <title>[DBAL-400] can&apos;t add primary key to mysql table after the table is created</title>
                <link>http://www.doctrine-project.org/jira/browse/DBAL-400</link>
                <project id="10040" key="DBAL">Doctrine DBAL</project>
                        <description>&lt;p&gt;A table in this application had no primary keys. I created an entity&lt;br/&gt;
so i could attempt to use the doctrine:schema:update command to fix it up.&lt;/p&gt;

&lt;p&gt;When i attempted to add this:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;@ORM\Id&lt;/li&gt;
	&lt;li&gt;@ORM\GeneratedValue(strategy=&quot;NONE&quot;)&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;to this:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;@ORM\Column(name=&quot;session_id&quot;, type=&quot;string&quot;, length=128,&lt;br/&gt;
nullable=false)&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;it generates SQL like this:&lt;/p&gt;
 &lt;blockquote&gt;
&lt;p&gt;ALTER TABLE whos_online DROP INDEX idx_session_id_zen, ADD UNIQUE INDEX primary (session_id);&lt;br/&gt;
ALTER TABLE whos_online CHANGE ip_address ip_address VARCHAR(45) NOT NULL, CHANGE host_address host_address VARCHAR(512) NOT NULL;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;and says this:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;  An exception occurred while executing &apos;ALTER TABLE whos_online DROP INDEX idx_session_id_zen, ADD UNIQUE INDEX primary (session_id  );                                                     &lt;br/&gt;
  SQLSTATE&lt;span class=&quot;error&quot;&gt;&amp;#91;42000&amp;#93;&lt;/span&gt;: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to  &lt;br/&gt;
   your MySQL server version for the right syntax to use near &apos;primary (session_id)&apos; at line 1  &lt;/p&gt;&lt;/blockquote&gt; </description>
                <environment></environment>
            <key id="14327">DBAL-400</key>
            <summary>can&apos;t add primary key to mysql table after the table is created</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="jrobeson">John Robeson</reporter>
                        <labels>
                    </labels>
                <created>Thu, 20 Dec 2012 06:59:04 +0000</created>
                <updated>Thu, 20 Dec 2012 07:08:06 +0000</updated>
                                                                    <component>Platforms</component>
                <component>Schema Managers</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>
</channel>
</rss>