X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;ds=sidebyside;f=app%2FDoctrineMigrations%2FVersion20170407200919.php;h=d9fff6c38fb9c49caefd5e8d15d8dadfd29832a3;hb=48f9a9632d2823be38883628ddfe62344cc282b1;hp=8a11ffe3f1ae55439e671c609357e4cc0928c35b;hpb=f808b01692a835673f328d7221ba8c212caa9b61;p=github%2Fwallabag%2Fwallabag.git diff --git a/app/DoctrineMigrations/Version20170407200919.php b/app/DoctrineMigrations/Version20170407200919.php index 8a11ffe3..d9fff6c3 100644 --- a/app/DoctrineMigrations/Version20170407200919.php +++ b/app/DoctrineMigrations/Version20170407200919.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; /** * Remove isPublic in Entry Table. */ -class Version20170407200919 extends AbstractMigration implements ContainerAwareInterface +class Version20170407200919 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')); @@ -33,9 +18,6 @@ class Version20170407200919 extends AbstractMigration implements ContainerAwareI $entryTable->dropColumn('is_public'); } - /** - * @param Schema $schema - */ public function down(Schema $schema) { $entryTable = $schema->getTable($this->getTable('entry')); @@ -43,9 +25,4 @@ class Version20170407200919 extends AbstractMigration implements ContainerAwareI $entryTable->addColumn('is_public', 'boolean', ['notnull' => false, 'default' => 0]); } - - private function getTable($tableName) - { - return $this->container->getParameter('database_table_prefix') . $tableName; - } }