X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=app%2FDoctrineMigrations%2FVersion20171125164500.php;h=2ee49d8726818b918644972e371c58641e776cc1;hb=8668796106b856ca041512af27268ce6e49d2caf;hp=980e0e75671ea187bb5e3acf4c41965ce0b6fbb1;hpb=893fd6434f11b6a1fef375f19e6ea427402bc605;p=github%2Fwallabag%2Fwallabag.git diff --git a/app/DoctrineMigrations/Version20171125164500.php b/app/DoctrineMigrations/Version20171125164500.php index 980e0e75..2ee49d87 100644 --- a/app/DoctrineMigrations/Version20171125164500.php +++ b/app/DoctrineMigrations/Version20171125164500.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 shaarli_share_origin_url in craue_config_setting. */ -class Version20171125164500 extends AbstractMigration implements ContainerAwareInterface +class Version20171125164500 extends WallabagMigration { - /** - * @var ContainerInterface - */ - private $container; - - public function setContainer(ContainerInterface $container = null) - { - $this->container = $container; - } - - /** - * @param Schema $schema - */ public function up(Schema $schema) { $shaarliShareOriginUrl = $this->container @@ -37,16 +22,8 @@ class Version20171125164500 extends AbstractMigration implements ContainerAwareI $this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('shaarli_share_origin_url', '0', 'entry')"); } - /** - * @param Schema $schema - */ public function down(Schema $schema) { $this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'shaarli_share_origin_url';"); } - - private function getTable($tableName) - { - return $this->container->getParameter('database_table_prefix') . $tableName; - } }