<!--
RSS generated by JIRA (5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5) at Wed Jun 19 19:06:01 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+DBAL+AND+resolution+%3D+Unresolved+AND+component+%3D+Platforms+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+DBAL+AND+resolution+%3D+Unresolved+AND+component+%3D+Platforms+ORDER+BY+priority+DESC</link>
        <description>An XML representation of a search request</description>
                <language>en-us</language>
                        <issue start="0" end="18" total="18"/>
                <build-info>
            <version>5.2.7</version>
            <build-number>850</build-number>
            <build-date>21-02-2013</build-date>
        </build-info>
<item>
            <title>[DBAL-122] Impossible to save data to image/binary/varbinary</title>
                <link>http://www.doctrine-project.org/jira/browse/DBAL-122</link>
                <project id="10040" key="DBAL">Doctrine DBAL</project>
                        <description>&lt;p&gt;When trying to insert a value into a Column with type &apos;image&apos;, &apos;binary&apos; or &apos;varbinary&apos; the SQLServer states that this is not possible.&lt;br/&gt;
When trying to insert into &apos;binary&apos; or &apos;varbinary&apos;  the error message is:&lt;br/&gt;
=&amp;gt; Implicit conversion from nvarchar(max) datatype to varbinary(max) is not allowed.&lt;/p&gt;

&lt;p&gt;When trying to insert into &apos;image&apos; the error message is:&lt;br/&gt;
=&amp;gt; Operand collision: nvarchar(max) is incompatible with image.&lt;/p&gt;

&lt;p&gt;Doctrine prepares the image/binary/varbinary column in the statements as  nvarchar(max) which is wrong.&lt;/p&gt;

&lt;p&gt;The cause of this error is that in the MsSQLPlatform::getVarcharTypeDeclarationSQLSnippet($length, $fixed),&lt;br/&gt;
or in the datatype mapping which is to &apos;text&apos;.&lt;/p&gt;

&lt;p&gt;The documentation for the MsSQLServer states following conversions (&lt;a href=&quot;http://207.46.16.252/de-de/library/ms187928.aspx):&quot; class=&quot;external-link&quot;&gt;http://207.46.16.252/de-de/library/ms187928.aspx):&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;*char =&amp;gt; binary/varbinary : Explicit conversion&lt;br/&gt;
nchar/nvarchar =&amp;gt; image : IMPOSSIBLE&lt;/p&gt;

&lt;p&gt;So the solution would be, either to leave the datatype blank or use the char/varchar datatype when saving into image/binary/varbinary, which would cause an extra datatype as those would collide with &apos;text&apos; I guess.&lt;/p&gt;
</description>
                <environment>XAMP, MsSQL-Server 2008, PHP 5.3.x, MS pdo_sqlsrv_vc6_ts.dll</environment>
            <key id="12637">DBAL-122</key>
            <summary>Impossible to save data to image/binary/varbinary</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="le_shatai">Martin Weise</reporter>
                        <labels>
                    </labels>
                <created>Mon, 16 May 2011 10:54:04 +0000</created>
                <updated>Wed, 22 Feb 2012 16:28:32 +0000</updated>
                                    <version>2.0.4</version>
                                                <component>Platforms</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="17201" author="beberlei" created="Mon, 9 Jan 2012 13:59:25 +0000"  >&lt;p&gt;I get the problem, but i don&apos;t understand the solutions &lt;img class=&quot;emoticon&quot; src=&quot;http://www.doctrine-project.org/jira/images/icons/emoticons/smile.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;

&lt;p&gt;Can you explain a bit more?&lt;/p&gt;

&lt;p&gt;1. how do i leave a datatype empty? and which one?&lt;br/&gt;
2. how do i use char/varchar when saving?&lt;/p&gt;

&lt;p&gt;I think this is just a problem of unspecific descriptions &lt;img class=&quot;emoticon&quot; src=&quot;http://www.doctrine-project.org/jira/images/icons/emoticons/smile.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</comment>
                    <comment id="17483" author="le_shatai" created="Wed, 22 Feb 2012 16:28:32 +0000"  >&lt;p&gt;Hi Benjamin&lt;/p&gt;

&lt;p&gt;Sorry, for this long delay.&lt;br/&gt;
I had a deeper inspection what happens when I persist data into a field of type varbinary(MAX) and I got this (using the SQL profiler):&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;declare @p1 int
set @p1=NULL
exec sp_prepexec @p1 output,
N&apos;@P1 nvarchar(36),@P2 nvarchar(max),@P3 nvarchar(34)&apos;,
N&apos;INSERT INTO mc_dokument_data (id, data, mc_dokument_id) VALUES (@P1, @P2, @P3)&apos;,
N&apos;03DDAAD1-4BFA-416B-A0C0-9B8B7148F31C&apos;,
N&apos;0x3c3f786d6c20766572736...&apos;,
N&apos;mwe3bc2c0da6543d1f48d7c83e64f5c449&apos;
&lt;span class=&quot;code-keyword&quot;&gt;select&lt;/span&gt; @p1
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;But it has to be ( removed &apos;-quotes and @P2 changed to varbinary(MAX) ):&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;declare @p1 int
set @p1=NULL
exec sp_prepexec @p1 output,
N&apos;@P1 nvarchar(36),@P2 varbinary(max),@P3 nvarchar(34)&apos;,
N&apos;INSERT INTO mc_dokument_data (id, data, mc_dokument_id) VALUES (@P1, @P2, @P3)&apos;,
N&apos;03DDAAD1-4BFA-416B-A0C0-9B8B7148F31C&apos;,
0x3c3f786d6c20766572736...,
N&apos;mwe3bc2c0da6543d1f48d7c83e64f5c449&apos;
&lt;span class=&quot;code-keyword&quot;&gt;select&lt;/span&gt; @p1
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I am not really sure any more if this is caused from Doctrine or from the &apos;MS SQL-Server PHP-PDO-Driver 2.0.1&apos; .&lt;br/&gt;
But I guess this comes from the driver.&lt;br/&gt;
If you can validate this, I will make a bug report to them.&lt;/p&gt;

&lt;p&gt;The &lt;em&gt;funny&lt;/em&gt; thing is if I do this via &lt;em&gt;executeQuery&lt;/em&gt; it works...&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;$data = unpack(&lt;span class=&quot;code-quote&quot;&gt;&quot;H*&quot;&lt;/span&gt; , __some__data__);
$data = &apos;0x&apos;.$data[1];

$em-&amp;gt;executeQuery(
    &lt;span class=&quot;code-quote&quot;&gt;&quot;INSERT INTO mc_dokument_data (id, mc_dokument_id, data)&quot;&lt;/span&gt;. 
   &lt;span class=&quot;code-quote&quot;&gt;&quot;VALUES(&apos;&quot;&lt;/span&gt;.$id.&lt;span class=&quot;code-quote&quot;&gt;&quot;&apos; , &apos;&quot;&lt;/span&gt; . $documentId . &lt;span class=&quot;code-quote&quot;&gt;&quot;&apos;, &quot;&lt;/span&gt; . $data . &lt;span class=&quot;code-quote&quot;&gt;&quot; )&quot;&lt;/span&gt;
);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;


&lt;p&gt;Hopefully I could clarify my problem.&lt;/p&gt;

&lt;p&gt;Regards&lt;br/&gt;
 Martin Weise&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DBAL-109] Doctrine/DBAL/Platforms/MySqlPlatform.php is missing test coverage around _getCreateTableSQL method</title>
                <link>http://www.doctrine-project.org/jira/browse/DBAL-109</link>
                <project id="10040" key="DBAL">Doctrine DBAL</project>
                        <description>&lt;p&gt;In &quot;Doctrine/DBAL/Platforms/MySqlPlatform.php&quot;, the following methods are public: getShowDatabasesSQL, getCreateDatabaseSQL, getDropDatabaseSQL, getDropTableSQL (easy to test); however, the &quot;_getCreateTableSQL&quot; method is not public.&lt;/p&gt;

&lt;p&gt;Is there a specific reason for this difference?&lt;/p&gt;

&lt;p&gt;As a result of this method not being tested, there is a &quot;quote&quot;  method being called which doesn&apos;t exist.&lt;/p&gt;

&lt;p&gt;See: &lt;a href=&quot;https://github.com/doctrine/dbal/blob/master/lib/Doctrine/DBAL/Platforms/MySqlPlatform.php#L410&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/dbal/blob/master/lib/Doctrine/DBAL/Platforms/MySqlPlatform.php#L410&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The only way at this time to test for this case is to get an error when doing: $table-&amp;gt;addOption(&apos;comment&apos;, &apos;...&apos;);&lt;/p&gt;

&lt;p&gt;I would suggest making the protected method public so it can be tested. I also suggest moving the options parsing out of _getCreateTableSQL into a helper method...this method seems a bit overloaded.&lt;/p&gt;

&lt;p&gt;If agreed, I&apos;m happy to take care of the cleanup. Just wanted to get some feedback on the ideas first.&lt;/p&gt;</description>
                <environment>2.1.0-DEV</environment>
            <key id="12558">DBAL-109</key>
            <summary>Doctrine/DBAL/Platforms/MySqlPlatform.php is missing test coverage around _getCreateTableSQL method</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="wilmoore">Wil Moore III</reporter>
                        <labels>
                    </labels>
                <created>Tue, 12 Apr 2011 15:21:03 +0000</created>
                <updated>Fri, 18 Nov 2011 16:46:56 +0000</updated>
                                    <version>2.1</version>
                                                <component>Platforms</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="16868" author="beberlei" created="Fri, 18 Nov 2011 16:46:56 +0000"  >&lt;p&gt;This is an improvement&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DBAL-96] Make approach towards identifier quoting consistent</title>
                <link>http://www.doctrine-project.org/jira/browse/DBAL-96</link>
                <project id="10040" key="DBAL">Doctrine DBAL</project>
                        <description>&lt;ul&gt;
	&lt;li&gt;Make the use of `` a general approach for explicit quoting of identifiers&lt;/li&gt;
	&lt;li&gt;introduce AbstractPlatform::getRegularSQLIdentifierCase($identifier)&lt;/li&gt;
	&lt;li&gt;Introduce AbstractPlatform::isRegularIdentifier($identifier)&lt;/li&gt;
	&lt;li&gt;Fix Schema Assets not to lower-case, but to check for explicit quoting before.&lt;/li&gt;
	&lt;li&gt;Filter values of identifiers passed to all platform functions when they are used in information schema queries according to `` explicit quoting rules.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Problem: Schema is independent of a vendor, this means we have to pick a behavior, i propose SQL-92&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;http://savage.net.au/SQL/sql-92.bnf&quot; class=&quot;external-link&quot;&gt;http://savage.net.au/SQL/sql-92.bnf&lt;/a&gt; See &amp;lt;actual identifier&amp;gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://www.alberton.info/dbms_identifiers_and_case_sensitivity.html&quot; class=&quot;external-link&quot;&gt;http://www.alberton.info/dbms_identifiers_and_case_sensitivity.html&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;This means:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;strtoupper() ALL tables, column, index, foreign key names that are not quoted by ``&lt;/li&gt;
	&lt;li&gt;For any Quoted identifiers by `` the case is kept.&lt;/li&gt;
	&lt;li&gt;We can introduce a validator to detect a schema that cannot be implemented with a given vendor platform.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;In conjunction with the SQL reserved keywords tickets we can then improve the DatabaseDriver considerably to detect identifier casings &lt;/p&gt;</description>
                <environment></environment>
            <key id="12431">DBAL-96</key>
            <summary>Make approach towards identifier quoting consistent</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Sat, 26 Feb 2011 16:09:43 +0000</created>
                <updated>Thu, 20 Sep 2012 06:19:57 +0000</updated>
                                                    <fixVersion>2.4</fixVersion>
                                <component>Platforms</component>
                <component>Schema Managers</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                            <issuelinks>
                        <issuelinktype id="10000">
                <name>Duplicate</name>
                                                <inwardlinks description="is duplicated by">
                            <issuelink>
            <issuekey id="12636">DBAL-120</issuekey>
        </issuelink>
                    </inwardlinks>
                            </issuelinktype>
                        <issuelinktype id="10001">
                <name>Reference</name>
                                <outwardlinks description="relates to">
                            <issuelink>
            <issuekey id="11857">DBAL-45</issuekey>
        </issuelink>
                    </outwardlinks>
                                                <inwardlinks description="is referenced by">
                            <issuelink>
            <issuekey id="11724">DBAL-40</issuekey>
        </issuelink>
                    </inwardlinks>
                            </issuelinktype>
                    </issuelinks>
                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DBAL-139] Oracle&apos;s sequences with NOCACHE</title>
                <link>http://www.doctrine-project.org/jira/browse/DBAL-139</link>
                <project id="10040" key="DBAL">Doctrine DBAL</project>
                        <description>&lt;p&gt;Hi community,&lt;/p&gt;

&lt;p&gt;Today I tried to generate Oracle&apos;s sequences with &quot;NOCACHE&quot;, but I checked that method &quot;getCreateSequenceSQL&quot; don&apos;t accept. Can we improvement this method to allow? Below an example of the sintaxe:&lt;/p&gt;

&lt;p&gt;CREATE SEQUENCE seq_test START WITH 1 INCREMENT BY 1 NOCACHE&lt;/p&gt;</description>
                <environment></environment>
            <key id="12865">DBAL-139</key>
            <summary>Oracle&apos;s sequences with NOCACHE</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="augustoximenes">Augusto Ximenes de Souza</reporter>
                        <labels>
                    </labels>
                <created>Fri, 29 Jul 2011 03:07:29 +0000</created>
                <updated>Thu, 8 Nov 2012 18:08:11 +0000</updated>
                                    <version>2.0.6</version>
                                                <component>Platforms</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="18694" author="antrophy" created="Sat, 22 Sep 2012 13:02:53 +0000"  >&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;If cache value is specified then syntax should contain CACHE keyword that follows the value and if value is not specified then it should go without CACHE keyword.&lt;br/&gt;
In this case sequence will be created with CACHE value 20 by default.&lt;br/&gt;
Min cache value is 2 and for determine max value we should have sequence max value defined which is by default 10^27 for an ascending sequence and -1 for a descending sequence.&lt;br/&gt;
Now the max cache value is calculated by the formula (CEIL (MAXVALUE - MINVALUE)) / ABS (INCREMENT).&lt;/p&gt;

&lt;p&gt;My Idea is to add cache attribute to Sequence object and then under the previous story, set cache to given value if value is greater than 1 and less than calculation by the given formula.&lt;/p&gt;

&lt;p&gt;For nocache, &lt;br/&gt;
I would use value of 0 so we will have values in domain (0,1&amp;lt;x&amp;lt;=(CEIL (MAXVALUE - MINVALUE)) / ABS (INCREMENT)).&lt;/p&gt;

&lt;p&gt;Some public function will return NOCACHE or CACHE n and that function could be called in getCreateSequenceSQL method from Sequence input parameter.&lt;/p&gt;

&lt;p&gt;Anyone have a better idea or I can code this and request pull from my fork?&lt;/p&gt;
</comment>
                    <comment id="18960" author="ramonornela" created="Thu, 8 Nov 2012 18:08:11 +0000"  >&lt;p&gt;Duplicate issue &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DBAL-348&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/jira/browse/DBAL-348&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Greetings&lt;br/&gt;
Ramon Ornelas&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DBAL-357] Missing way to set types for CAST declaration</title>
                <link>http://www.doctrine-project.org/jira/browse/DBAL-357</link>
                <project id="10040" key="DBAL">Doctrine DBAL</project>
                        <description>&lt;p&gt;For a query such as&lt;/p&gt;

&lt;p&gt;    x = CASE WHEN id=$1 THEN CAST($2 AS int)&lt;/p&gt;

&lt;p&gt;there doesn&apos;t seem to be a way to correctly assign the type across multiple platforms. E.g. Postgres required &quot;int&quot; but mysql just requires &quot;unsigned&quot;. Attempting to use &quot;int&quot; here with mysql will fail.&lt;/p&gt;

&lt;p&gt;The method Doctrine\DBAL\Platforms method getIntegerTypeDeclarationSQL will return something like &quot;INT unsigned&quot; for sql, which also fails.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14095">DBAL-357</key>
            <summary>Missing way to set types for CAST declaration</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>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="petesiss">Pete Sisson</reporter>
                        <labels>
                    </labels>
                <created>Thu, 4 Oct 2012 07:50:35 +0000</created>
                <updated>Thu, 4 Oct 2012 07:50:35 +0000</updated>
                                    <version>2.2</version>
                <version>2.3</version>
                                                <component>Platforms</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DBAL-289] Wrong diff between Oracle &apos;Date&apos; type and Metadata &apos;Date&apos; type</title>
                <link>http://www.doctrine-project.org/jira/browse/DBAL-289</link>
                <project id="10040" key="DBAL">Doctrine DBAL</project>
                        <description>&lt;p&gt;Hi,&lt;br/&gt;
I want to update my schema but I am getting the following error message:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;Doctrine\DBAL\Driver\OCI8\OCI8Exception&amp;#93;&lt;/span&gt;&lt;br/&gt;
ORA-01442: column to be modified to NOT NULL is already NOT NULL&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;--dump-sql says:&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;ALTER TABLE CONSIGNMENTS MODIFY (SDGDATE  DATE DEFAULT NULL);&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The current table structure looks like that:&lt;/p&gt;
&lt;table class=&apos;confluenceTable&apos;&gt;&lt;tbody&gt;
&lt;tr&gt;
&lt;th class=&apos;confluenceTh&apos;&gt; Column Name &lt;/th&gt;
&lt;th class=&apos;confluenceTh&apos;&gt; Data Type &lt;/th&gt;
&lt;th class=&apos;confluenceTh&apos;&gt; Nullable &lt;/th&gt;
&lt;th class=&apos;confluenceTh&apos;&gt; Default &lt;/th&gt;
&lt;th class=&apos;confluenceTh&apos;&gt; Primary Key &lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; SDGDATE &lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; DATE &lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; Yes &lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; NULL &lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;


&lt;p&gt;Mapping definition:&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;/**
 * @ORM\Column(name=&lt;span class=&quot;code-quote&quot;&gt;&quot;SDGDATE&quot;&lt;/span&gt;,type=&lt;span class=&quot;code-quote&quot;&gt;&quot;date&quot;&lt;/span&gt;,nullable=&lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;)
 */
&lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; $sdgdate;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I think there is a problem with the comparison between Oracles &apos;Date&apos; type and the Metadata &apos;Date&apos; type. I am used to use MySQL as DBMS but our customer uses Oracle. MySQL&apos;s &apos;datetime&apos; and Oracle&apos;s &apos;date&apos; type are store the same data.&lt;/p&gt;

&lt;p&gt;I am not sure what should be done here. Because this could lead to confusion for all Oracle user.&lt;/p&gt;

&lt;p&gt;Maybe there could be a request to the platform in the Schema Comparator here:&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 diffColumn(Column $column1, Column $column2)
{
    $changedProperties = array();
    &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ( $column1-&amp;gt;getType() != $column2-&amp;gt;getType() ) {
        $changedProperties[] = &apos;type&apos;;
    }
    &lt;span class=&quot;code-comment&quot;&gt;// ...
&lt;/span&gt;}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment>Oracle Express 11g and doctrine-dbal 2.2.2</environment>
            <key id="13741">DBAL-289</key>
            <summary>Wrong diff between Oracle &apos;Date&apos; type and Metadata &apos;Date&apos; type</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/reopened.png">Reopened</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="naitsirch">Christian Stoller</reporter>
                        <labels>
                    </labels>
                <created>Wed, 30 May 2012 08:45:55 +0000</created>
                <updated>Wed, 22 Aug 2012 10:34:21 +0000</updated>
                                    <version>2.2.2</version>
                                                <component>Platforms</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="18028" author="naitsirch" created="Wed, 30 May 2012 08:59:49 +0000"  >&lt;p&gt;When I put a breakpoint on the second line of the &lt;em&gt;diffColumn&lt;/em&gt; method in my IDE and stop there during debugging I have those variable values:&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;$this				Doctrine\DBAL\Schema\Comparator		
$changedProperties		array[0]		
$column1			Doctrine\DBAL\Schema\Column		
  _type				Doctrine\DBAL\Types\DateTimeType	&amp;lt;-- datetime
  _precision			integer		10	
  _scale			integer		0	
  _unsigned			boolean		0	
  _fixed			boolean		0	
  _notnull			boolean		0	
  _autoincrement		boolean		0	
  _platformOptions		array[0]		
  _comment			string		&quot;&quot;	
  _customSchemaOptions		array[0]		
  _name				string		&quot;SDGDATE&quot;	
  _quoted			boolean		0	
$column2			Doctrine\DBAL\Schema\Column		
  _type				Doctrine\DBAL\Types\DateType		&amp;lt;-- date
  _precision			integer		0	
  _scale			integer		0	
  _unsigned			boolean		0	
  _fixed			boolean		0	
  _notnull			boolean		0	
  _autoincrement		boolean		0	
  _platformOptions		array[1]		
  _customSchemaOptions		array[0]		
  _name				string		&quot;SDGDATE&quot;	
  _quoted			boolean		0	
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;You see that there are different types. But it would be nice if the comparison would say: &quot;Theay are equal - no diff&quot;&lt;/p&gt;</comment>
                    <comment id="18251" author="beberlei" created="Sun, 8 Jul 2012 20:16:14 +0000"  >&lt;p&gt;This issue can&apos;t be fixed. Doctrine has this type abstraction here which prevents a special case fix here. The solution in this case is obvious, set the type to &quot;datetime&quot; on Oracle.&lt;/p&gt;</comment>
                    <comment id="18531" author="naitsirch" created="Wed, 22 Aug 2012 10:34:21 +0000"  >&lt;p&gt;Sorry, this issue commes up again.&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-javascript&quot;&gt;
Shipment:
  type: entity
  fields:
    id:
      type: integer
      id: &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;
      generator:
        strategy: AUTO
    pickupDate:
      type: date
      column: pickup_date
    pickupTimeFrom:
      type: time
      column: pickup_time_from
  lifecycleCallbacks: {  }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;When I update my schema with the above YAML mapping, I always get the following error although I haven&apos;t changed anything at the mapping.&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;&lt;font color=&quot;red&quot;&gt;&lt;br/&gt;
C:\projects\xyz\trunk&amp;gt;php app\console doctrine:schema:update --force&lt;br/&gt;
Updating database schema...&lt;br/&gt;
Der Befehl &quot;stty&quot; ist entweder falsch geschrieben oder&lt;br/&gt;
konnte nicht gefunden werden.&lt;br/&gt;
&lt;br/&gt;
  &lt;span class=&quot;error&quot;&gt;&amp;#91;Doctrine\DBAL\Driver\OCI8\OCI8Exception&amp;#93;&lt;/span&gt;&lt;br/&gt;
  ORA-01442: column to be modified to NOT NULL is already NOT NULL&lt;br/&gt;
&lt;br/&gt;
C:\projects\osl\trunk&amp;gt;php app\console doctrine:schema:update --dump-sql&lt;br/&gt;
ALTER TABLE SHIPMENT MODIFY (pickup_date  DATE NOT NULL, pickup_time_from  DATE NOT NULL)&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Okay, I could change the types to &apos;datetime&apos;, but what if I have to move to MySQL? I just want to store &apos;date&apos; and &apos;time&apos;, not &apos;datetime&apos;.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DBAL-477] Just doublequote all schema names and field names in PostgreSQL sql command generation, and the same for MySQL</title>
                <link>http://www.doctrine-project.org/jira/browse/DBAL-477</link>
                <project id="10040" key="DBAL">Doctrine DBAL</project>
                        <description>&lt;p&gt;Generation of any SQL command to the database (From entities or migration versions) does not quote all the reserved keywords (For example a fieldname `right`.&lt;/p&gt;

&lt;p&gt;Simple fix that always works: double-quote dbname, schemaname and fieldname&lt;/p&gt;

&lt;p&gt;e.g   &quot;dbsecurity&quot;.&quot;userschema&quot;.&quot;users&quot; or &quot;tblusers&quot;&lt;/p&gt;

&lt;p&gt;MySQL : use the ` sign.&lt;/p&gt;

&lt;p&gt;e.g   `security`.`users` or `tblusers` (No support for schemas since I last checked some time ago)&lt;/p&gt;</description>
                <environment>Any PostgreSQL environment</environment>
            <key id="14740">DBAL-477</key>
            <summary>Just doublequote all schema names and field names in PostgreSQL sql command generation, and the same for MySQL</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>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="josdewitte">jos de witte</reporter>
                        <labels>
                        <label>mysql</label>
                        <label>postgresql</label>
                    </labels>
                <created>Thu, 28 Mar 2013 22:11:56 +0000</created>
                <updated>Thu, 28 Mar 2013 22:11:56 +0000</updated>
                                    <version>2.3.2</version>
                                                <component>Platforms</component>
                <component>Schema Managers</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DBAL-444] OraclePlatform getSequenceNextValSQL not handling case/quoting properly on 11g</title>
                <link>http://www.doctrine-project.org/jira/browse/DBAL-444</link>
                <project id="10040" key="DBAL">Doctrine DBAL</project>
                        <description>&lt;p&gt;I have an installer script that uses ORM SchemaTool to create the entities in the DB and then populates with basic data using basic EM-&amp;gt;persist calls via ORM.&lt;/p&gt;

&lt;p&gt;Sequence objects are created, and when using the 10g Instant Client everything worked correctly, however, upon upgrade to latest version of the Instant Client Oracle seems to be expecting consistent case for these schema objects. It appears as if they are being created with a quoted name as they are created in lowercase. OraclePlatform::getSequenceNextValSQL, however, generates &quot;SELECT entity_id_seq.nextval FROM DUAL&quot; and this fails with error &quot;General error: 2289 OCIStmtExecute: ORA-02289: sequence does not exist&quot;.&lt;/p&gt;

&lt;p&gt;Executing &quot;SELECT &quot;entity_id_seq&quot;.nextval FROM DUAL&quot; directly on the DB returns the correct value.&lt;/p&gt;

&lt;p&gt;I believe this may also impact the code in &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DBAL-278&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/jira/browse/DBAL-278&lt;/a&gt;&lt;/p&gt;</description>
                <environment>PHP version 5.4.11&lt;br/&gt;
Oracle 11g Instant Client version 11.2.0.3.0&lt;br/&gt;
Oracle Database 11g Enterprise Edition version 11.2.0.3.0 (x64)&lt;br/&gt;
OCI8 DBAL driver</environment>
            <key id="14474">DBAL-444</key>
            <summary>OraclePlatform getSequenceNextValSQL not handling case/quoting properly on 11g</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="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/inprogress.png">In Progress</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="maxmilaney">Max Milaney</reporter>
                        <labels>
                        <label>oci8</label>
                        <label>oracle</label>
                        <label>sequence</label>
                    </labels>
                <created>Sun, 10 Feb 2013 23:13:00 +0000</created>
                <updated>Thu, 4 Apr 2013 21:22:17 +0000</updated>
                                    <version>2.3.2</version>
                                <fixVersion>2.4</fixVersion>
                                <component>Platforms</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="19819" author="maxmilaney" created="Sun, 10 Mar 2013 05:06:49 +0000"  >&lt;p&gt;Hi there,&lt;br/&gt;
Wondering if there is any update on this? I&apos;m having to use a workaround in my applications.&lt;br/&gt;
Cheers,&lt;br/&gt;
Max&lt;/p&gt;</comment>
                    <comment id="19853" author="beberlei" created="Thu, 14 Mar 2013 20:54:52 +0000"  >&lt;p&gt;Can you maybe show an entity definition with its sequence mapping?&lt;/p&gt;</comment>
                    <comment id="19872" author="maxmilaney" created="Sun, 17 Mar 2013 21:05:36 +0000"  >&lt;p&gt;Here you are mate. Please see attachment.&lt;/p&gt;</comment>
                    <comment id="19941" author="beberlei" created="Thu, 4 Apr 2013 21:22:17 +0000"  >&lt;p&gt;I cant seem to find the problem, in DBAL &quot;lib/Doctrine/DBAL/Platforms/OraclePlatform.php&quot; on line 171, the sequence statement is created with $sequence-&amp;gt;getQuotedName($platform), but this only works if quoting is requrested for the sequence.&lt;/p&gt;

&lt;p&gt;How do you actually create the sequence? Your entity doesnt have @GeneratedValue.&lt;/p&gt;

&lt;p&gt;What does the create schema command say with &quot;--dump-sql&quot; flag? Is the SQL quoted?&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11512" name="example.php" size="1001" author="maxmilaney" created="Sun, 17 Mar 2013 21:05:36 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DBAL-505] Issue whenusing serial columns in PostgreSQL</title>
                <link>http://www.doctrine-project.org/jira/browse/DBAL-505</link>
                <project id="10040" key="DBAL">Doctrine DBAL</project>
                        <description>

&lt;p&gt;When using Doctrine ORM mapping fields like this:&lt;/p&gt;

&lt;p&gt;    /**&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;@var integer&lt;br/&gt;
     *&lt;/li&gt;
	&lt;li&gt;@ORM\Column(name=&quot;id&quot;, type=&quot;integer&quot;, nullable=false)&lt;/li&gt;
	&lt;li&gt;@ORM\Id&lt;/li&gt;
	&lt;li&gt;@ORM\GeneratedValue(strategy=&quot;IDENTITY&quot;)&lt;/li&gt;
	&lt;li&gt;@ORM\SequenceGenerator(sequenceName=&quot;schemaname.tablename_id_seq&quot;, allocationSize=1, initialValue=1)&lt;br/&gt;
     */&lt;br/&gt;
    private $id;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;It first creates the migration perfectly as a serial column with the correct schema.&lt;/p&gt;

&lt;p&gt;However when making a new migration diff it generates DROP statements for every sequence for these id, so we have to remove them manually every time.&lt;/p&gt;</description>
                <environment>PostgreSQL</environment>
            <key id="14807">DBAL-505</key>
            <summary>Issue whenusing serial columns in PostgreSQL</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>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="josdewitte">jos de witte</reporter>
                        <labels>
                    </labels>
                <created>Wed, 24 Apr 2013 20:02:08 +0000</created>
                <updated>Wed, 24 Apr 2013 20:02:08 +0000</updated>
                                    <version>2.3.3</version>
                                                <component>Drivers</component>
                <component>Platforms</component>
                <component>Schema Managers</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DBAL-264] Support for UIDs in PostgreSQL</title>
                <link>http://www.doctrine-project.org/jira/browse/DBAL-264</link>
                <project id="10040" key="DBAL">Doctrine DBAL</project>
                        <description>&lt;p&gt;Please add support for uuid datatype in PostgreSQL&lt;/p&gt;</description>
                <environment></environment>
            <key id="13671">DBAL-264</key>
            <summary>Support for UIDs in PostgreSQL</summary>
                <type id="2" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/newfeature.png">New Feature</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="10000" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/needinfo.png">Awaiting Feedback</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="rivaros">ross neacoders</reporter>
                        <labels>
                    </labels>
                <created>Mon, 30 Apr 2012 16:09:09 +0000</created>
                <updated>Mon, 29 Apr 2013 02:05:11 +0000</updated>
                                    <version>2.3</version>
                                                <component>Platforms</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>3</watches>
                        <comments>
                    <comment id="18828" author="zeroem" created="Fri, 12 Oct 2012 06:00:59 +0000"  >&lt;p&gt;It seems the only missing piece is the implementation of the getGuidExpression method in the PostgreSqlPlatform class.&lt;/p&gt;

&lt;p&gt;Details on generating UUIDs from postgres can be found here:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.postgresql.org/docs/current/static/uuid-ossp.html&quot; class=&quot;external-link&quot;&gt;http://www.postgresql.org/docs/current/static/uuid-ossp.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Things that would need to be addressed:&lt;/p&gt;

&lt;p&gt;1) It requires the uuid-ossp module to be installed in the database.  Solve with documentation or ...?&lt;/p&gt;

&lt;p&gt;2) There isn&apos;t just one function.  Just pick one or make it configurable with a sane default?&lt;/p&gt;</comment>
                    <comment id="19113" author="scribblet" created="Mon, 10 Dec 2012 05:20:26 +0000"  >&lt;p&gt;I have implemented this for my own project, using what I think is a sane default:&lt;/p&gt;

&lt;p&gt;    public function getGuidExpression()&lt;/p&gt;
    {
        return &apos;uuid_generate_v4()&apos;;
    }

&lt;p&gt;The other issue I think that needs addressing is that the extension must be loaded into the current database upon creation. Either this is a deal-breaker right here (relying on a PGSQL plugin that&apos;s not available by default)&lt;/p&gt;

&lt;p&gt;OR&lt;/p&gt;

&lt;p&gt;If not, maybe schema:update/create needs to check for whether postgresql is being used, whether there is a guid type/generator being used in an entity, and then either execute CREATE EXTENSION uuid-ossp;, and failing that return an exception that informs the user that uuid-ossp must be available as an extension before GUID generation can be used in entities.&lt;/p&gt;

&lt;p&gt;Can someone explain to me please the position on this currently? Is it not ok to rely on non-core/standard functionality?&lt;/p&gt;</comment>
                    <comment id="20101" author="mbadolato" created="Thu, 25 Apr 2013 00:23:23 +0000"  >&lt;p&gt;Is there any sort of decision on this item? I was trying to use UUID with Postgres and finally got it to work by adding&lt;/p&gt;

&lt;p&gt;public function getGuidExpression()&lt;/p&gt;
{
    return &apos;UUID_GENERATE_V4()&apos;;
}

&lt;p&gt;and went to submit a patch, then found this ticket and see that it&apos;s the exact same solution that Ross Cousens submitted above. I&apos;d really like to not maintain my own fork of the repository just to have this change in place, and it seems like a reasonable fix (barring the uuid-ossp extension not being a Postgres default extension). Can we get this in there so it&apos;s available, and worry about the issue of informing the user about the extension at a later point?  &lt;/p&gt;

&lt;p&gt;Or is there an easy way that anyone knows that I can add the function to my own class (in a Symfony2 project) that would extend PostgreSqlPlatform.php and add the function, without the need for me to fork Doctrine and add it on my own?&lt;/p&gt;

&lt;p&gt;Thanks,&lt;br/&gt;
--mark&lt;/p&gt;</comment>
                    <comment id="20106" author="mbadolato" created="Thu, 25 Apr 2013 18:24:26 +0000"  >&lt;p&gt;Pull request submitted&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/doctrine/dbal/pull/312&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/dbal/pull/312&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="20107" author="scribblet" created="Fri, 26 Apr 2013 01:50:37 +0000"  >&lt;p&gt;I hope this gets accepted but I fear it won&apos;t.&lt;/p&gt;

&lt;p&gt;The original complaint against implementing GUID for the PostgreSQL platform driver was because a) it required a separate extension to be enabled on the server itself b) and there were a number of GUID generation functions available.&lt;/p&gt;

&lt;p&gt;To use anything but v4 would be asinine unless some external constraint was forcing you to use the older generation algorithms, so I think argument b is mostly moot. Argument a can easily be solved with documentation, programmatically as well (would require more work) or just left as is because the error back from postgresql is very verbose. Cannot find function uuid_generate_v4. Google it, see that extension is required, see that it&apos;s available in PostgreSQL contrib packages, enable it, and voila it works.&lt;/p&gt;</comment>
                    <comment id="20108" author="mbadolato" created="Fri, 26 Apr 2013 02:30:09 +0000"  >&lt;p&gt;Agreed, and I think that having SOMETHING that is usable (and has a very clear message that you need to install an extension) is better than nothing. The implementation can be expanded later to cover the extension not existing, or using something other than v4, etc.  But this should be good enough for most people and it seems silly not to have, or at least not have a way to override and provide it. &lt;/p&gt;

&lt;p&gt;I was looking at the Symfony configs to see if there was a way to define my own platform class that could then just extend the current PostgreSqlPlatform class and add a the function, but that doesn&apos;t seem to be doable (or I just missed it)&lt;/p&gt;</comment>
                    <comment id="20118" author="mbadolato" created="Sat, 27 Apr 2013 08:40:08 +0000"  >&lt;p&gt;I just saw that this got merged into master. As soon as this hits 2.3* I can do away with the manual UUID generation for id&apos;s that we&apos;re currently doing &lt;img class=&quot;emoticon&quot; src=&quot;http://www.doctrine-project.org/jira/images/icons/emoticons/smile.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;

&lt;p&gt;Thanks much Benjamin!&lt;/p&gt;</comment>
                    <comment id="20124" author="scribblet" created="Mon, 29 Apr 2013 02:04:36 +0000"  >&lt;p&gt;Yay, I am happy that this has been accepted and will make it through to next release. Thank you Mark/Benjamin!&lt;/p&gt;

</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DBAL-407] Refactor exceptions</title>
                <link>http://www.doctrine-project.org/jira/browse/DBAL-407</link>
                <project id="10040" key="DBAL">Doctrine DBAL</project>
                        <description>&lt;p&gt;It&apos;s currently rather hard to figure out what went wrong when for example a DBALException was thrown. You have to actually match the message in it, or read the status code of the -&amp;gt;getPrevious() exception, which can be different for all drivers (as &lt;a href=&quot;https://github.com/jackalope/jackalope-doctrine-dbal/issues/80&quot; class=&quot;external-link&quot;&gt;https://github.com/jackalope/jackalope-doctrine-dbal/issues/80&lt;/a&gt; shows).&lt;/p&gt;

&lt;p&gt;I&apos;d suggest creating new exception classes for all situations and throwing them instead. If they extend the DBAL Exception and pass the message to it as it is right now, there will be no BC break.&lt;/p&gt;

&lt;p&gt;If this were to be done, on which branch should this be applied?&lt;/p&gt;</description>
                <environment></environment>
            <key id="14355">DBAL-407</key>
            <summary>Refactor exceptions</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>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="burgov">Bart van den Burg</reporter>
                        <labels>
                    </labels>
                <created>Mon, 7 Jan 2013 18:09:34 +0000</created>
                <updated>Mon, 6 May 2013 06:10:18 +0000</updated>
                                                                    <component>Drivers</component>
                <component>Platforms</component>
                <component>Schema Managers</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>4</watches>
                        <comments>
                    <comment id="19251" author="stof" created="Mon, 7 Jan 2013 19:32:17 +0000"  >&lt;p&gt;This should be done in the master branch.&lt;/p&gt;

&lt;p&gt;Another solution, avoiding to create many classes, would be to use the exception code, which is always kept as 0 currently (the default value of the Exception class). You could have a code for each case (with constants in the DBALException class) and then checking &lt;tt&gt;$e-&amp;gt;getCode()&lt;/tt&gt; to identify what went wrong.&lt;/p&gt;</comment>
                    <comment id="19252" author="burgov" created="Mon, 7 Jan 2013 20:09:55 +0000"  >&lt;p&gt;I&apos;d prefer actual named exceptions. It makes catching them simpler. However, adding some code defined in DBAL would be an acceptable alternative. &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;try&lt;/span&gt; {
    /* ... /*
} &lt;span class=&quot;code-keyword&quot;&gt;catch&lt;/span&gt; (NoSuchTableException $e) {
    &lt;span class=&quot;code-comment&quot;&gt;// &lt;span class=&quot;code-keyword&quot;&gt;do&lt;/span&gt; something
&lt;/span&gt;} &lt;span class=&quot;code-keyword&quot;&gt;catch&lt;/span&gt; (DuplicateKeyException $e) {
    &lt;span class=&quot;code-comment&quot;&gt;// &lt;span class=&quot;code-keyword&quot;&gt;do&lt;/span&gt; something &lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt;
&lt;/span&gt;}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;v.s.&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;try&lt;/span&gt; {
    /* ... /*
} &lt;span class=&quot;code-keyword&quot;&gt;catch&lt;/span&gt; (DBALException $e) {
    &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ($e-&amp;gt;getCode() == DBALException::NO_SUCH_TABLE) {
        &lt;span class=&quot;code-comment&quot;&gt;// &lt;span class=&quot;code-keyword&quot;&gt;do&lt;/span&gt; something
&lt;/span&gt;    } elseif ($e-&amp;gt;getCode() == DBALException::DUPLICATE_KEY) {
        &lt;span class=&quot;code-comment&quot;&gt;// &lt;span class=&quot;code-keyword&quot;&gt;do&lt;/span&gt; something &lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt;
&lt;/span&gt;    } &lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt; {
        &lt;span class=&quot;code-keyword&quot;&gt;throw&lt;/span&gt; $e;
    }
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="20217" author="chrisguitarguy" created="Mon, 6 May 2013 03:29:45 +0000"  >&lt;p&gt;I would also prefer named exceptions. You&apos;re going to have a lot of problems providing the &quot;code&quot; value in DBALException in any case: SQLSTATE codes are alphanumeric, and will cause warnings/errors when creating new exception.&lt;/p&gt;

&lt;p&gt;Besides we can get the SQL state code now:&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;    try {
        // ...
    } catch (\Doctrine\DBAL\DBALException $e) {
        $code = $e-&amp;gt;getPrevious()-&amp;gt;getCode();
        // do stuff with $code
    }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The problem is that there are a lot of error codes defined in the ANSI SQL standard: &lt;a href=&quot;http://www.postgresql.org/docs/9.2/static/errcodes-appendix.html&quot; class=&quot;external-link&quot;&gt;http://www.postgresql.org/docs/9.2/static/errcodes-appendix.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Maybe throwing an specific exception for each &quot;class&quot; of SQLSTATE codes? So if the error code from a PDO exception starts with 23, DBAL would throw `\Doctrine\DBAL\Exception\IntegrityConstraintViolationException`.&lt;/p&gt;

&lt;p&gt;This also seems like the logic to handle throwing exceptions should be contained in the platforms as some implementations may differ. You could have a method in `AbstractPlatform` that takes care of the ANSI SQLSTATE error code classes and leave it up subclasses to deal with platform specific cases. Whenever `Connection` catches a `PDOException`, dispatch it to the platform to deal with.&lt;/p&gt;

&lt;p&gt;Example: &lt;a href=&quot;https://gist.github.com/chrisguitarguy/e021918900e93dca304d&quot; class=&quot;external-link&quot;&gt;https://gist.github.com/chrisguitarguy/e021918900e93dca304d&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thoughts?&lt;/p&gt;</comment>
                    <comment id="20218" author="mnapoli" created="Mon, 6 May 2013 06:09:52 +0000"  >&lt;p&gt;I have implemented a thing of that kind in a personal project (on top of Doctrine). It is &lt;b&gt;really&lt;/b&gt; useful to be able to catch a ForeignKeyViolationException, and get with entity/field caused the problem (for that my EntityManager wrapper parse the exception message).&lt;/p&gt;

&lt;p&gt;However, note that exception codes differ from DB engines. In my case, I did it quick and used MySQL error codes, but managing different RDBMS implies more work.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DBAL-525] PostgreSQL - getDateTimeFormatString() missing</title>
                <link>http://www.doctrine-project.org/jira/browse/DBAL-525</link>
                <project id="10040" key="DBAL">Doctrine DBAL</project>
                        <description>&lt;p&gt;Using PostgreSQL and column with &quot;timestamp without time zone&quot; returns datetime in format Y-m-d H:i:s.u but not always. If u is zero the PHP driver returns Y-m-d H:i:s format only. Specification of function getDateTimeFormatString is missing for this case too. It&apos;s required to resolve described different two formats and add getDateTimeFormatString with usec to postgres platform&lt;br/&gt;
It&apos;s similar as &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DBAL-397&quot; title=&quot;PostgreSQL - getDateTimeTzFormatString()&quot;&gt;&lt;del&gt;DBAL-397&lt;/del&gt;&lt;/a&gt; but for not time zone datetimes. It throws the same exception as in linked issue.&lt;/p&gt;</description>
                <environment>PostgreSQL Database</environment>
            <key id="14978">DBAL-525</key>
            <summary>PostgreSQL - getDateTimeFormatString() missing</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>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="honzap">Jan Pecek</reporter>
                        <labels>
                        <label>datetime</label>
                        <label>format</label>
                        <label>postgresql</label>
                    </labels>
                <created>Wed, 22 May 2013 09:16:56 +0000</created>
                <updated>Wed, 22 May 2013 09:16:56 +0000</updated>
                                    <version>2.3.4</version>
                                                <component>Platforms</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DBAL-175] Table comments in Doctrine\DBAL\Schema\Table Object</title>
                <link>http://www.doctrine-project.org/jira/browse/DBAL-175</link>
                <project id="10040" key="DBAL">Doctrine DBAL</project>
                        <description>&lt;p&gt;Should be useful discover the table comments from database schema.&lt;/p&gt;

&lt;p&gt;This feature is already available for column comments, but not for table comments&lt;/p&gt;</description>
                <environment></environment>
            <key id="13059">DBAL-175</key>
            <summary>Table comments in Doctrine\DBAL\Schema\Table Object</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="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="goetas">Asmir Mustafic</reporter>
                        <labels>
                    </labels>
                <created>Thu, 6 Oct 2011 10:16:13 +0000</created>
                <updated>Mon, 17 Oct 2011 07:03:10 +0000</updated>
                                                                    <component>Platforms</component>
                <component>Schema Managers</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DBAL-167] Schema comparator doesn&apos;t work properly with columnDefinition&apos;s</title>
                <link>http://www.doctrine-project.org/jira/browse/DBAL-167</link>
                <project id="10040" key="DBAL">Doctrine DBAL</project>
                        <description>&lt;p&gt;Schema comparator will mostly always return changed properties on columns for entities defined with &lt;em&gt;columnDefinition&lt;/em&gt; even they are identical in the DB. This is due to weak low-lever compatibility of &lt;em&gt;SchemaTool#getCreateSchemaSql()&lt;/em&gt; and &lt;em&gt;SchemaTool#getSchemaFromMetadata()&lt;/em&gt; &amp;#8211; the first one doesn&apos;t reconstruct &lt;em&gt;columnDefinition&lt;/em&gt;, and the other one never supports &lt;em&gt;&apos;fixed&apos;&lt;/em&gt;, &lt;em&gt;&apos;default&apos;&lt;/em&gt;, cannot determine, whether it is &lt;em&gt;boolean&lt;/em&gt; or &lt;em&gt;integer&lt;/em&gt; (ex. TINYINT in the DB), etc...&lt;/p&gt;

&lt;p&gt;All this results in extremely annoying unnecessary alter-table-change-columns surrounded by dropping and after that re-enabling constrains dependent on those columns.&lt;/p&gt;

&lt;p&gt;I mean stuff like this:&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;symfony2#app/console doctrine:schema:update --dump-sql&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;...
ALTER TABLE es_hotels DROP FOREIGN KEY FK_527F88EE584598A3F92F3E70;
ALTER TABLE es_hotels DROP FOREIGN KEY FK_527F88EE584598A37A3ABE5D;
ALTER TABLE es_hotels DROP FOREIGN KEY FK_527F88EE584598A3EE551564;
ALTER TABLE es_hotels CHANGE is_active is_active TINYINT(1) NOT NULL DEFAULT &apos;1&apos;, CHANGE checksum checksum CHAR(32) DEFAULT NULL;
ALTER TABLE es_hotels ADD CONSTRAINT FK_527F88EE584598A3F92F3E70 FOREIGN KEY (operator_id, country_id) REFERENCES es_countries(operator_id, id) ON DELETE CASCADE;
ALTER TABLE es_hotels ADD CONSTRAINT FK_527F88EE584598A37A3ABE5D FOREIGN KEY (operator_id, resort_id) REFERENCES es_resorts(operator_id, id) ON DELETE CASCADE;
ALTER TABLE es_hotels ADD CONSTRAINT FK_527F88EE584598A3EE551564 FOREIGN KEY (operator_id, subresort_id) REFERENCES es_subresorts(operator_id, id) ON DELETE CASCADE;
...
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The simple solution would be to fix schema comparator not to signal any changes on columns with &lt;em&gt;columnDefinition&lt;/em&gt; properties. &lt;br/&gt;
But would be much and much better to add some code to all &lt;em&gt;*SchemaManager#getPortableTableColumnDefinition&lt;/em&gt; so they would reconstuct &lt;em&gt;columnDefinition&lt;/em&gt; and they would be matched in the schema comparator. &lt;/p&gt;

&lt;p&gt;I can do this &lt;img class=&quot;emoticon&quot; src=&quot;http://www.doctrine-project.org/jira/images/icons/emoticons/wink.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="13023">DBAL-167</key>
            <summary>Schema comparator doesn&apos;t work properly with columnDefinition&apos;s</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="strygin">Dmitry Strygin</reporter>
                        <labels>
                    </labels>
                <created>Sat, 17 Sep 2011 23:38:42 +0000</created>
                <updated>Mon, 16 Jul 2012 06:57:07 +0000</updated>
                                    <version>2.0.8</version>
                <version>2.1</version>
                <version>2.1.1</version>
                <version>2.1.2</version>
                                                <component>Drivers</component>
                <component>Platforms</component>
                <component>Schema Managers</component>
                        <due></due>
                    <votes>2</votes>
                        <watches>3</watches>
                        <comments>
                    <comment id="16636" author="roderick" created="Sun, 16 Oct 2011 13:58:19 +0000"  >&lt;p&gt;I&apos;m having the same issue on my production webserver, but not on the development webserver. I find that odd. It tries to drop all foreign keys and create them again, although without the CHANGE statement you are referring to, Dmitry.&lt;/p&gt;</comment>
                    <comment id="17206" author="beberlei" created="Mon, 9 Jan 2012 14:33:26 +0000"  >&lt;p&gt;This maybe fixable by making a hash out of the column definition and saving it into a database comment.&lt;/p&gt;

&lt;p&gt;The Foreign Key problem maybe because of an old MySQL version 5.0.x&lt;/p&gt;</comment>
                    <comment id="18310" author="joec4i" created="Mon, 16 Jul 2012 06:57:07 +0000"  >&lt;p&gt;@beberlei, sounds good to me. any plan of implementing this? &lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DBAL-293] mysql platform can not choose text type column</title>
                <link>http://www.doctrine-project.org/jira/browse/DBAL-293</link>
                <project id="10040" key="DBAL">Doctrine DBAL</project>
                        <description>&lt;p&gt;getVarcharMaxLength() in DBAL/Platforms/MySqlPlatform.php returns 65535;&lt;br/&gt;
So, it never choose &quot;text&quot;, choose &quot;mediumtext&quot;.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13790">DBAL-293</key>
            <summary>mysql platform can not choose text type column</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="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/inprogress.png">In Progress</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="shirokappa">Kiichi Kajiura</reporter>
                        <labels>
                    </labels>
                <created>Wed, 20 Jun 2012 14:40:48 +0000</created>
                <updated>Sat, 8 Sep 2012 19:51:48 +0000</updated>
                                    <version>2.2.2</version>
                                                <component>Platforms</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="18211" author="beberlei" created="Thu, 5 Jul 2012 21:12:32 +0000"  >&lt;p&gt;How do you call the schema/platform code?&lt;/p&gt;

&lt;p&gt;The code is correct, i think you are using it wrong.&lt;/p&gt;</comment>
                    <comment id="18336" author="shirokappa" created="Thu, 19 Jul 2012 03:54:18 +0000"  >&lt;p&gt;I don&apos;t use it directly.&lt;br/&gt;
I use it in my entity class file with annotations.&lt;br/&gt;
e.g. &lt;br/&gt;
    @Mapping\Column(type=&quot;text&quot;)&lt;br/&gt;
    @Mapping\Column(type=&quot;text&quot;, length=65535)&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<item>
            <title>[DBAL-422] Wrong VARCHAR default length in SQLServerPlatform</title>
                <link>http://www.doctrine-project.org/jira/browse/DBAL-422</link>
                <project id="10040" key="DBAL">Doctrine DBAL</project>
                        <description>&lt;p&gt;In SQLServerPlatform the default length for a VARCHAR declaration is set to &quot;255&quot;. But according to the SQLServer documentation from Microsoft the default length is &quot;1&quot;, if omitted in the declaration.&lt;br/&gt;
See remarks: &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms186939.aspx&quot; class=&quot;external-link&quot;&gt;http://msdn.microsoft.com/en-us/library/ms186939.aspx&lt;/a&gt;&lt;br/&gt;
Also the default length is hardcoded in the &quot;getVarcharTypeDeclarationSQLSnippet&quot; method which in my opinion should be evaluated through &quot;getVarcharDefaultLength&quot;.&lt;/p&gt;

&lt;p&gt;I don&apos;t exactly know if the current implementation is intended, otherwise it should be fixed. I would then create an PR if desired.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14407">DBAL-422</key>
            <summary>Wrong VARCHAR default length in SQLServerPlatform</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="deeky666">Steve M&#252;ller</reporter>
                        <labels>
                        <label>platform</label>
                        <label>sqlserver</label>
                        <label>sqlsrv</label>
                        <label>varchar</label>
                    </labels>
                <created>Thu, 24 Jan 2013 01:25:45 +0000</created>
                <updated>Thu, 24 Jan 2013 01:25:45 +0000</updated>
                                    <version>2.3.2</version>
                                                <component>Platforms</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>

<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>

<item>
            <title>[DBAL-7] Add support for char fields in the ORM layer</title>
                <link>http://www.doctrine-project.org/jira/browse/DBAL-7</link>
                <project id="10040" key="DBAL">Doctrine DBAL</project>
                        <description>&lt;p&gt;It&apos;s not possible to use char fields in the ORM layer.&lt;/p&gt;

&lt;p&gt;It should be possible to use something like:&lt;/p&gt;

&lt;p&gt;@Column(type=&quot;char&quot;) or ...&lt;br/&gt;
@Column(type=&quot;string&quot;, fixed=true) or ...&lt;br/&gt;
@Column(type=&quot;fixedstring&quot;)&lt;/p&gt;</description>
                <environment></environment>
            <key id="10767">DBAL-7</key>
            <summary>Add support for char fields in the ORM layer</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="romanb">Roman S. Borschel</assignee>
                                <reporter username="darkangel">Glen Ainscow</reporter>
                        <labels>
                    </labels>
                <created>Sun, 24 Jan 2010 10:45:06 +0000</created>
                <updated>Sat, 17 Sep 2011 21:57:10 +0000</updated>
                                    <version>2.1</version>
                <version>2.1.1</version>
                <version>2.1.2</version>
                                                <component>Drivers</component>
                <component>Platforms</component>
                <component>Schema Managers</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="11454" author="romanb" created="Sun, 24 Jan 2010 11:04:25 +0000"  >&lt;p&gt;I dont think this is worth including in the main distribution. A char does not save much compared to a varchar (1 Byte?) and you already have 2 options to make a char:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;create your own custom type (i.e. FixedString)&lt;/li&gt;
	&lt;li&gt;Use @Column(..., columnDefinition=&quot;CHAR(2)&quot;)&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;IMHO, just use a string type with the length you want: @Column(type=&quot;string&quot;, length=2). That becomes a varchar with length 2.&lt;/p&gt;</comment>
                    <comment id="11455" author="darkangel" created="Sun, 24 Jan 2010 12:59:24 +0000"  >&lt;p&gt;Ya, it is only 1 extra byte. I&apos;m not sure what to do, I like things as optimized as possible, but I guess I could just use columnDefinition if necessary.&lt;/p&gt;</comment>
                    <comment id="11456" author="darkangel" created="Sun, 24 Jan 2010 13:06:21 +0000"  >&lt;p&gt;Actually, I don&apos;t really see any reason &lt;b&gt;not&lt;/b&gt; to include the char type.&lt;/p&gt;</comment>
                    <comment id="11457" author="romanb" created="Sun, 24 Jan 2010 13:40:46 +0000"  >&lt;p&gt;How about code bloat? &lt;img class=&quot;emoticon&quot; src=&quot;http://www.doctrine-project.org/jira/images/icons/emoticons/smile.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</comment>
                    <comment id="11460" author="darkangel" created="Sun, 24 Jan 2010 16:07:46 +0000"  >&lt;p&gt;How many LoC?&lt;/p&gt;</comment>
                    <comment id="11463" author="guilhermeblanco" created="Mon, 25 Jan 2010 13:43:31 +0000"  >&lt;p&gt;@darkangel Around 40. And lots of conditionals, which decreases efficiency of algorithm.&lt;/p&gt;

&lt;p&gt;I vote for FixedString DBAL DataType.&lt;/p&gt;</comment>
                    <comment id="11466" author="romanb" created="Mon, 25 Jan 2010 13:54:45 +0000"  >&lt;p&gt;We will not put every special data type someone comes up with in the core library. If we go this route, at the end we have 100+ data types (100+ classes plus a bloated type map) in the core library.&lt;/p&gt;

&lt;p&gt;There are at least 2 decent options of making a char already if you care about byte counting (see above).&lt;/p&gt;

&lt;p&gt;&quot;Why not?&quot; is not the question to ask for when it comes to new features. If it were, we would include a whole lot of stuff that is useless for 99% of the users. There must be strong arguments for &quot;Why?&quot; and there are none.&lt;/p&gt;

&lt;p&gt;If we get 50+ votes on this issue we can talk again.&lt;/p&gt;
</comment>
                    <comment id="11470" author="darkangel" created="Mon, 25 Jan 2010 14:27:18 +0000"  >&lt;p&gt;Of course not. I didn&apos;t know that char was a special data type (especially since it&apos;s supported in DC1.2).&lt;/p&gt;

&lt;p&gt;I will use @columnDefinition.&lt;/p&gt;

&lt;p&gt;You may close this issue.&lt;/p&gt;</comment>
                    <comment id="11474" author="romanb" created="Mon, 25 Jan 2010 14:37:30 +0000"  >&lt;p&gt;No need to become defensive. There is still the chance that demand for this particular type gets very high and that can change things.&lt;/p&gt;

&lt;p&gt;Thats why this stays open. Otherwise the next guy would probably just create a duplicate ticket (not sure whether non-owners can reopen other tickets).&lt;/p&gt;</comment>
                    <comment id="11476" author="beberlei" created="Mon, 25 Jan 2010 15:21:24 +0000"  >&lt;p&gt;@Glen&lt;/p&gt;

&lt;p&gt;The problem with Doctrine 1 and having lots of different data-types is that of maintainability. You have to ensure that all the types work on all supported platforms with each and every version. The more datatypes we support by default the more complex will it be for the Doctrine 2 Core to ensure compability and maintainability in this regard.&lt;/p&gt;

&lt;p&gt;For each new platform that we will support all datatypes have to be supported for example, something that might even become impossible for some databases.&lt;/p&gt;

&lt;p&gt;Adding a datatype from the user perspective is rather simple though, it has to be tested once and is only about 20-40 LOC. I bet you 100 bucks that soon there will be code-snippets out there on all the different database specific types as a doctrine 2 implemention.&lt;/p&gt;</comment>
                    <comment id="11479" author="darkangel" created="Mon, 25 Jan 2010 16:37:57 +0000"  >&lt;p&gt;@Roman&lt;br/&gt;
Not being defensive, I have accepted/respected your decision. &lt;img class=&quot;emoticon&quot; src=&quot;http://www.doctrine-project.org/jira/images/icons/emoticons/smile.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;

&lt;p&gt;@Benamin&lt;br/&gt;
I did think about cross-database compatibility. As far as I know, char is supported by the vast majority (or at least easily simulated). But I understand.&lt;/p&gt;

&lt;p&gt;Thanks.&lt;/p&gt;</comment>
                    <comment id="16490" author="strygin" created="Sat, 17 Sep 2011 21:56:28 +0000"  >&lt;p&gt;Sorry for party rocking but i think that &lt;em&gt;&apos;fixed&apos;&lt;/em&gt; annotation should be enabled in ORM column definitions. &lt;br/&gt;
In this case @Column(type=&quot;string&quot;, length=4, fixed=true) would result in &quot;CHAR(4)&quot; for MySQL, Oracle and Postgres, Sqlite, and DB2, &quot;NCHAR(4)&quot; for MQSQL. etc... It is much more elegant than that &lt;em&gt;columnDefinition&lt;/em&gt;.&lt;br/&gt;
It is already supported by DBAL as well as &lt;em&gt;&apos;default&apos;&lt;/em&gt; heartlessly removed (&lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-100&quot; title=&quot;Default values are not escaped&quot;&gt;&lt;del&gt;DDC-100&lt;/del&gt;&lt;/a&gt;) from annotation driver due to bizzare reluctance to deal with proper escaping of values.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>
</channel>
</rss>