X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=app%2FDoctrineMigrations%2FVersion20171105202000.php;h=5313a3368c6ac7a04d6aadbba8c44037ad0cd7e7;hb=9ce18f06c33e1cfb56fc0021c4992696442bac91;hp=3769045feb1ba2c8b47c73d3040abf458db3885a;hpb=f4f7994c40ca57c7e6f8ca0a3d298c50c4e5f813;p=github%2Fwallabag%2Fwallabag.git diff --git a/app/DoctrineMigrations/Version20171105202000.php b/app/DoctrineMigrations/Version20171105202000.php index 3769045f..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. */ -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; - } }