X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=app%2FDoctrineMigrations%2FVersion20160812120952.php;h=f5f90850dfbb48101bc56ee533185a71fa6bfa35;hb=8668796106b856ca041512af27268ce6e49d2caf;hp=d28f3a71d0728eca50b92c83bba90506d26b1ddf;hpb=773ac5b0f7a56ff2527601498b0822d6ef8bfa40;p=github%2Fwallabag%2Fwallabag.git diff --git a/app/DoctrineMigrations/Version20160812120952.php b/app/DoctrineMigrations/Version20160812120952.php index d28f3a71..f5f90850 100644 --- a/app/DoctrineMigrations/Version20160812120952.php +++ b/app/DoctrineMigrations/Version20160812120952.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; /** * Added name field on wallabag_oauth2_clients. */ -class Version20160812120952 extends AbstractMigration implements ContainerAwareInterface +class Version20160812120952 extends WallabagMigration { - /** - * @var ContainerInterface - */ - private $container; - - public function setContainer(ContainerInterface $container = null) - { - $this->container = $container; - } - - /** - * @param Schema $schema - */ public function up(Schema $schema) { $clientsTable = $schema->getTable($this->getTable('oauth2_clients')); @@ -46,9 +31,6 @@ class Version20160812120952 extends AbstractMigration implements ContainerAwareI } } - /** - * @param Schema $schema - */ public function down(Schema $schema) { $clientsTable = $schema->getTable($this->getTable('oauth2_clients')); @@ -65,9 +47,4 @@ class Version20160812120952 extends AbstractMigration implements ContainerAwareI $clientsTable->dropColumn('name'); } } - - private function getTable($tableName) - { - return $this->container->getParameter('database_table_prefix') . $tableName; - } }