X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=app%2FDoctrineMigrations%2FVersion20160410190541.php;h=5b6d83dcef20a5cb1b7bc9fda18c6175f83ca115;hb=98d8e0c1b929a198da0fbcbffbc011e985b5df01;hp=55c12ce15f4879f700009897f3dec84d9e03cdf4;hpb=2490f61dca635026a3eb9b5e9b6978b1981b1172;p=github%2Fwallabag%2Fwallabag.git diff --git a/app/DoctrineMigrations/Version20160410190541.php b/app/DoctrineMigrations/Version20160410190541.php index 55c12ce1..5b6d83dc 100644 --- a/app/DoctrineMigrations/Version20160410190541.php +++ b/app/DoctrineMigrations/Version20160410190541.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 foreign keys for account resetting. */ -class Version20160410190541 extends AbstractMigration implements ContainerAwareInterface +class Version20160410190541 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')); @@ -46,9 +31,6 @@ class Version20160410190541 extends AbstractMigration implements ContainerAwareI } } - /** - * @param Schema $schema - */ public function down(Schema $schema) { $entryTable = $schema->getTable($this->getTable('entry')); @@ -56,9 +38,4 @@ class Version20160410190541 extends AbstractMigration implements ContainerAwareI $this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'share_public'"); } - - private function getTable($tableName) - { - return $this->container->getParameter('database_table_prefix') . $tableName; - } }