X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=app%2FDoctrineMigrations%2FVersion20161118134328.php;h=2298447a21c3c920c302c2a308ddfda440295781;hb=365b3dd21f7c4f3e7f2b6f1502f284a6190dd918;hp=dab0ff5b47b96020734a3602c74da5206ebb35d4;hpb=f808b01692a835673f328d7221ba8c212caa9b61;p=github%2Fwallabag%2Fwallabag.git diff --git a/app/DoctrineMigrations/Version20161118134328.php b/app/DoctrineMigrations/Version20161118134328.php index dab0ff5b..2298447a 100644 --- a/app/DoctrineMigrations/Version20161118134328.php +++ b/app/DoctrineMigrations/Version20161118134328.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 http_status in `entry_table`. */ -class Version20161118134328 extends AbstractMigration implements ContainerAwareInterface +class Version20161118134328 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')); @@ -37,9 +22,6 @@ class Version20161118134328 extends AbstractMigration implements ContainerAwareI ]); } - /** - * @param Schema $schema - */ public function down(Schema $schema) { $entryTable = $schema->getTable($this->getTable('entry')); @@ -48,9 +30,4 @@ class Version20161118134328 extends AbstractMigration implements ContainerAwareI $entryTable->dropColumn('http_status'); } - - private function getTable($tableName) - { - return $this->container->getParameter('database_table_prefix') . $tableName; - } }