I'm using Symfony 1.4 with Doctrine.
Here's my initial schema:
Page:
tableName: page
columns:
ref:
type: string(50)
notnull: true
unique: true
I'd like to remove the index on the ref column using migrations. So the schema becomes:
Page:
tableName: page
columns:
ref:
type: string(50)
notnull: true
And my migration file is something like:
class Changepageref extends Doctrine_Migration_Base
{
public function up()
{
$this->removeIndex('page','ref');
}
public function down()
{
$this->addIndex('page','ref', array('fields'=>array('ref'=>array()),'unique'=>true));
}
}
But this won't work when I run it because it's looking for an index named "ref_idx". But if I look at my database, doctrine created an index named "ref", not "ref_idx".
What am I doing wrong?