X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=app%2FDoctrineMigrations%2FVersion20161001072726.php;h=bb7e69686be233f7e5198fb02d6f28e7e1389a73;hb=bfe7a692261760517199a3797191fd214fc2ee6c;hp=4babe1721b187deda082634c826d33e78ed6455e;hpb=2490f61dca635026a3eb9b5e9b6978b1981b1172;p=github%2Fwallabag%2Fwallabag.git diff --git a/app/DoctrineMigrations/Version20161001072726.php b/app/DoctrineMigrations/Version20161001072726.php index 4babe172..bb7e6968 100644 --- a/app/DoctrineMigrations/Version20161001072726.php +++ b/app/DoctrineMigrations/Version20161001072726.php @@ -2,33 +2,21 @@ namespace Application\Migrations; -use Doctrine\DBAL\Migrations\AbstractMigration; use Doctrine\DBAL\Migrations\SkipMigrationException; use Doctrine\DBAL\Schema\Schema; -use Symfony\Component\DependencyInjection\ContainerAwareInterface; -use Symfony\Component\DependencyInjection\ContainerInterface; +use Wallabag\CoreBundle\Doctrine\WallabagMigration; /** * Added pocket_consumer_key field on wallabag_config. */ -class Version20161001072726 extends AbstractMigration implements ContainerAwareInterface +class Version20161001072726 extends WallabagMigration { - /** - * @var ContainerInterface - */ - private $container; - - public function setContainer(ContainerInterface $container = null) - { - $this->container = $container; - } - /** * @param Schema $schema */ public function up(Schema $schema) { - $this->skipIf($this->connection->getDatabasePlatform()->getName() === 'sqlite', 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.'); + $this->skipIf('sqlite' === $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.'); // remove all FK from entry_tag switch ($this->connection->getDatabasePlatform()->getName()) { @@ -117,9 +105,4 @@ class Version20161001072726 extends AbstractMigration implements ContainerAwareI { throw new SkipMigrationException('Too complex ...'); } - - private function getTable($tableName) - { - return $this->container->getParameter('database_table_prefix') . $tableName; - } }