X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=app%2FDoctrineMigrations%2FVersion20170824113337.php;h=dc20f6d9c28e631a35b564b659466eedbd4a3ae3;hb=8668796106b856ca041512af27268ce6e49d2caf;hp=e54a9bcf7ea2bcfcd407b72ffa0de63ab9c531a3;hpb=773ac5b0f7a56ff2527601498b0822d6ef8bfa40;p=github%2Fwallabag%2Fwallabag.git diff --git a/app/DoctrineMigrations/Version20170824113337.php b/app/DoctrineMigrations/Version20170824113337.php index e54a9bcf..dc20f6d9 100644 --- a/app/DoctrineMigrations/Version20170824113337.php +++ b/app/DoctrineMigrations/Version20170824113337.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 starred_at column and set its value to updated_at for is_starred entries. */ -class Version20170824113337 extends AbstractMigration implements ContainerAwareInterface +class Version20170824113337 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')); @@ -49,9 +34,6 @@ class Version20170824113337 extends AbstractMigration implements ContainerAwareI ); } - /** - * @param Schema $schema - */ public function down(Schema $schema) { $entryTable = $schema->getTable($this->getTable('entry')); @@ -60,9 +42,4 @@ class Version20170824113337 extends AbstractMigration implements ContainerAwareI $entryTable->dropColumn('starred_at'); } - - private function getTable($tableName) - { - return $this->container->getParameter('database_table_prefix') . $tableName; - } }