X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=app%2FDoctrineMigrations%2FVersion20161214094402.php;h=0240f599490d8d1f7649378c21000efdb70e19d5;hb=48b0163d247554d7e2f1ec63b717c8216ea9ec59;hp=07090b2f2779a7f7a906d8e1f53c7b1d10f5065d;hpb=2490f61dca635026a3eb9b5e9b6978b1981b1172;p=github%2Fwallabag%2Fwallabag.git diff --git a/app/DoctrineMigrations/Version20161214094402.php b/app/DoctrineMigrations/Version20161214094402.php index 07090b2f..0240f599 100644 --- a/app/DoctrineMigrations/Version20161214094402.php +++ b/app/DoctrineMigrations/Version20161214094402.php @@ -2,29 +2,14 @@ namespace Application\Migrations; -use Doctrine\DBAL\Migrations\AbstractMigration; use Doctrine\DBAL\Schema\Schema; -use Symfony\Component\DependencyInjection\ContainerAwareInterface; -use Symfony\Component\DependencyInjection\ContainerInterface; +use Wallabag\CoreBundle\Doctrine\WallabagMigration; /** * Renamed uuid to uid in entry table. */ -class Version20161214094402 extends AbstractMigration implements ContainerAwareInterface +class Version20161214094402 extends WallabagMigration { - /** - * @var ContainerInterface - */ - private $container; - - public function setContainer(ContainerInterface $container = null) - { - $this->container = $container; - } - - /** - * @param Schema $schema - */ public function up(Schema $schema) { $entryTable = $schema->getTable($this->getTable('entry')); @@ -47,9 +32,6 @@ class Version20161214094402 extends AbstractMigration implements ContainerAwareI } } - /** - * @param Schema $schema - */ public function down(Schema $schema) { $entryTable = $schema->getTable($this->getTable('entry')); @@ -67,9 +49,4 @@ class Version20161214094402 extends AbstractMigration implements ContainerAwareI $this->addSql('ALTER TABLE ' . $this->getTable('entry') . ' RENAME uid TO uuid'); } } - - private function getTable($tableName) - { - return $this->container->getParameter('database_table_prefix') . $tableName; - } }