use Symfony\Component\DependencyInjection\ContainerInterface;
/**
- * Added index on wallabag_entry.uuid
+ * Added index on wallabag_entry.uid.
*/
class Version20161214094403 extends AbstractMigration implements ContainerAwareInterface
{
*/
private $container;
- private $indexName = 'IDX_entry_uiid';
+ private $indexName = 'IDX_entry_uid';
public function setContainer(ContainerInterface $container = null)
{
$this->container = $container;
}
- private function getTable($tableName)
- {
- return $this->container->getParameter('database_table_prefix').$tableName;
- }
-
/**
* @param Schema $schema
*/
$entryTable = $schema->getTable($this->getTable('entry'));
$this->skipIf($entryTable->hasIndex($this->indexName), 'It seems that you already played this migration.');
- $entryTable->addIndex(['uuid'], $this->indexName);
+ $entryTable->addIndex(['uid'], $this->indexName);
}
/**
$entryTable->dropIndex($this->indexName);
}
+
+ private function getTable($tableName)
+ {
+ return $this->container->getParameter('database_table_prefix') . $tableName;
+ }
}