X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=app%2FDoctrineMigrations%2FVersion20171105202000.php;h=5313a3368c6ac7a04d6aadbba8c44037ad0cd7e7;hb=a5ac6046838766eb888180b4f1d0717631ed8f14;hp=b1cff9cea7f334ee053a220e0e8cd89d885612d8;hpb=e0ef1a1c8b6badd2f52acbdcf928469ef1a15b3e;p=github%2Fwallabag%2Fwallabag.git diff --git a/app/DoctrineMigrations/Version20171105202000.php b/app/DoctrineMigrations/Version20171105202000.php index b1cff9ce..5313a336 100644 --- a/app/DoctrineMigrations/Version20171105202000.php +++ b/app/DoctrineMigrations/Version20171105202000.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; /** - * Add origin_url column + * Add origin_url column. */ -class Version20171105202000 extends AbstractMigration implements ContainerAwareInterface +class Version20171105202000 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')); @@ -36,9 +21,6 @@ class Version20171105202000 extends AbstractMigration implements ContainerAwareI ]); } - /** - * @param Schema $schema - */ public function down(Schema $schema) { $entryTable = $schema->getTable($this->getTable('entry')); @@ -47,9 +29,4 @@ class Version20171105202000 extends AbstractMigration implements ContainerAwareI $entryTable->dropColumn('origin_url'); } - - private function getTable($tableName) - { - return $this->container->getParameter('database_table_prefix') . $tableName; - } }