I went to the site to add a comment that this bug has me seriously concerned as 
I have spent some weeks getting to know Symfony and all that is wasted if this 
is allowed to continue. It would be a showstopper for me. For a severe bug to 
be allowed to continue would destroy confidence in the product.

However, I found no link for adding a comment but was able to vote for it. I 
urge all to vote for this ... unless there are more severe issues to deal with 
- which in that case it would be even worse.

-----Original Message-----
From: symfony-users@googlegroups.com [mailto:symfony-us...@googlegroups.com] On 
Behalf Of Michal Piotrowski
Sent: Tuesday, May 11, 2010 9:09 AM
To: symfony-users@googlegroups.com
Subject: Re: [symfony-users] Doctrine Migration

2010/5/11 Samuel Morhaim <samuel.morh...@gmail.com>:
> I did remove the idx.. but still get the same error.

This still seems to be similar to the bug that I reported
http://www.doctrine-project.org/jira/browse/DC-617

Please add your bug as a comment to my report - maybe it will get more
attention.

BTW. You can also try to comment function that adds _idx suffix while
executing migrations. You can localize it
in backtrace.

>
> Thank you anyway.. any other suggestions please?
>
>
> 2010/5/11 Michał Piotrowski <mkkp...@gmail.com>
>>
>> Hi,
>>
>> 2010/5/11 Samuel Morhaim <samuel.morh...@gmail.com>:
>> > Hi,
>> >
>> > When attempting to do a migration I get the error below. Reading about,
>> > it
>> > mentions that I am probably missing an index for the key, but I already
>> > added it. I also made sure that both the local and foreign key are the
>> > same
>> > type, cleared cache, etc.   Please help as I need to do this migration.
>> >
>> >
>> >    - SQLSTATE[HY000]: General error: 1005 Can't create table
>> > './zd2/#sql-605_46046.frm' (errno: 150). Failing Query: "ALTER TABLE
>> > message_queue ADD CONSTRAINT message_queue_campaign_id_campaign_id
>> > FOREIGN
>> > KEY (campaign_id) REFERENCES campaign(id)"
>> >
>> >
>> >
>> > Doing a "show innodb status;" I get the following message but it doesnt
>> > make
>> > sense, since the key is already there and confirmed by the error i get
>> > when
>> > i attempt the migration for a second time.
>> >
>> > 100510 18:30:08 Error in foreign key constraint of table
>> > zd2/#sql-605_45ffb:
>> > FOREIGN KEY (campaign_id) REFERENCES campaign(id):
>> > Cannot find an index in the referenced table where the
>> > referenced columns appear as the first columns, or column types
>> > in the table and the referenced table do not match for constraint.
>> >
>> >
>> >    - SQLSTATE[42000]: Syntax error or access violation: 1061 Duplicate
>> > key
>> > name 'campaign_id_idx_idx'. Failing Query: "CREATE INDEX
>> > campaign_id_idx_idx
>> > ON message_queue (campaign_id)"
>> >
>> >
>> >
>> >
>> > ======
>> > up part of migration (down ommited for the email)
>> >
>> >       $this->addIndex('message_queue', 'campaign_id_idx', array(
>>
>> I think that I know this bug, you need to change this to campaign_id
>>
>> Regards,
>> Michal
>>
>> >               'fields' => array(
>> >                               'campaign_id' => array()
>> >                           )
>> >           ));
>> >
>> >
>> >       $this->createForeignKey('message_queue',
>> > 'message_queue_campaign_id_campaign_id', array(
>> >              'local' => 'campaign_id',
>> >              'foreign' => 'id',
>> >                'foreignTable' => 'campaign'
>> >         ));
>> >
>> >
>> >
>> >
>> >
>> > Schema
>> >
>> > MessageQueue:
>> >   actAs: { Timestampable: ~ }
>> >   columns:
>> >     id:                { primary: true, unique: true, type: integer
>> > ,notnull: true, autoincrement: true }
>> >     subscriber_id:     { type: integer, notnull: false }
>> >     campaign_id:       { type: integer, notnull: false }
>> >     schedule_at:       { type: timestamp, notnull: true }
>> >     msg_contents:      { type: string(255), notnull: true }
>> >     status:            { type: enum, values:
>> > [Pending,Delivered,Canceled,Failed], notnull: true }
>> >   relations:
>> >     Campaign:
>> >       local: campaign_id
>> >       foreign: id
>> >
>> >
>> > --
>> > If you want to report a vulnerability issue on symfony, please send it
>> > to
>> > security at symfony-project.com
>> >
>> > You received this message because you are subscribed to the Google
>> > Groups "symfony users" group.
>> > To post to this group, send email to symfony-users@googlegroups.com
>> > To unsubscribe from this group, send email to
>> > symfony-users+unsubscr...@googlegroups.com
>> > For more options, visit this group at
>> > http://groups.google.com/group/symfony-users?hl=en
>> >
>>
>> --
>> If you want to report a vulnerability issue on symfony, please send it to
>> security at symfony-project.com
>>
>> You received this message because you are subscribed to the Google
>> Groups "symfony users" group.
>> To post to this group, send email to symfony-users@googlegroups.com
>> To unsubscribe from this group, send email to
>> symfony-users+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/symfony-users?hl=en
>
> --
> If you want to report a vulnerability issue on symfony, please send it to
> security at symfony-project.com
>
> You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> To post to this group, send email to symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en
>

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to