<!-- 
RSS generated by JIRA (5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5) at Wed Jun 19 12:47:04 UTC 2013

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

<item>
            <title>[DC-536] Duplicate CREATE TABLE entries in schema.sql when using column_inheritance</title>
                <link>http://www.doctrine-project.org/jira/browse/DC-536</link>
                <project id="10031" key="DC">Doctrine 1</project>
                        <description>&lt;p&gt;When creating a model involving column_inheritance the CREATE TABLE statement gets duplicated.&lt;/p&gt;

&lt;p&gt;The second CREATE TABLE include an index for the keyField.&lt;/p&gt;

&lt;p&gt;Test doctrine generated models and generated schema.sql attached.&lt;/p&gt;</description>
                <environment>MySQL 5 / PHP 5.3.1 / Symfony 1.4.3 (branch) / Doctrine 1.2.1 / Mac OSX</environment>
            <key id="10981">DC-536</key>
            <summary>Duplicate CREATE TABLE entries in schema.sql when using column_inheritance</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>Tue, 2 Mar 2010 12:38:25 +0000</created>
                <updated>Thu, 18 Nov 2010 01:44:16 +0000</updated>
                                    <version>1.2.1</version>
                                                <component>Inheritance</component>
                        <due></due>
                    <votes>3</votes>
                        <watches>4</watches>
                        <comments>
                    <comment id="11973" author="webpragmatist" created="Tue, 2 Mar 2010 13:05:19 +0000"  >&lt;p&gt;It seems this issue is related to using array_unique() and databases which doctrine creates index along with the CREATE TABLE statement.&lt;/p&gt;

&lt;p&gt;This does not occur on sqlite as shown above in the console-log.txt (this db uses the CREATE INDEX statement).&lt;/p&gt;</comment>
                    <comment id="11975" author="sacho" created="Tue, 2 Mar 2010 13:25:36 +0000"  >&lt;p&gt;Yes, it seems SQL CREATE TABLE statements are generated for each of the children as well, but with sqlite, array_unique() filters out the ones that are &quot;extra&quot;.&lt;br/&gt;
But the MySQL statements all differ(due to indexes, I don&apos;t know if other things can cause them to differ as well), and as such all are left.&lt;/p&gt;</comment>
                    <comment id="12867" author="boutell" created="Fri, 7 May 2010 12:22:40 +0000"  >&lt;p&gt;We&apos;re seeing this issue too. doctrine:build --all --and-load works fine, but doctrine:build-sql generates duplicate CREATE TABLE statements. Our in-house workflow is the former, so the latter came as a surprise. Is there any sign of progress on this one?&lt;/p&gt;</comment>
                    <comment id="13533" author="bascht" created="Wed, 7 Jul 2010 09:14:06 +0000"  >&lt;p&gt;This looks like a Duplicate of &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DC-123&quot; class=&quot;external-link&quot;&gt;DC-123&lt;/a&gt;.&lt;/p&gt;</comment>
                    <comment id="14772" author="kerdany" created="Thu, 18 Nov 2010 01:43:39 +0000"  >&lt;p&gt;A little addition to the symptoms of this problem.&lt;/p&gt;

&lt;p&gt;If the one of the child classes has a foreign key to another entity, another Third Create table SQL will be created, which contains the an index on the foreign key column.&lt;/p&gt;

&lt;p&gt;In other words, it seems that an additional create table statement is created for each automatically created index.&lt;/p&gt;

&lt;p&gt;An illustration is in the attached yml and sql schema:&lt;br/&gt;
kerdany_10-11-18-08-30.yml&lt;br/&gt;
kerdany_10-11-18-08-30.sql&lt;/p&gt;

&lt;p&gt;Tom Boutell: doctrine:build --all generates the problem with me!&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10413" name="BaseInherited.class.php" size="429" author="webpragmatist" created="Tue, 2 Mar 2010 12:38:25 +0000" />
                    <attachment id="10412" name="BaseInheriter.class.php" size="1525" author="webpragmatist" created="Tue, 2 Mar 2010 12:38:25 +0000" />
                    <attachment id="10871" name="kerdany_10-11-18-08-30.sql" size="633" author="kerdany" created="Thu, 18 Nov 2010 01:42:16 +0000" />
                    <attachment id="10870" name="kerdany_10-11-18-08-30.yml" size="407" author="kerdany" created="Thu, 18 Nov 2010 01:42:16 +0000" />
                    <attachment id="10414" name="sandbox-console.txt" size="1465" author="webpragmatist" created="Tue, 2 Mar 2010 13:05:19 +0000" />
                    <attachment id="10411" name="schema.sql" size="416" author="webpragmatist" created="Tue, 2 Mar 2010 12:38:25 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>
</channel>
</rss>