]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - app/DoctrineMigrations/Version20161128084725.php
Fixed migrations with dash into db name
[github/wallabag/wallabag.git] / app / DoctrineMigrations / Version20161128084725.php
index 242d59006c3ffe876924a5f97939e0c7b35021ee..ef747154a6e0b0214461d3e4c1f18449713a85b6 100644 (file)
@@ -2,31 +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 list_mode in user config.
  */
-class Version20161128084725 extends AbstractMigration implements ContainerAwareInterface
+class Version20161128084725 extends WallabagMigration
 {
-    /**
-     * @var ContainerInterface
-     */
-    private $container;
-
-    public function setContainer(ContainerInterface $container = null)
-    {
-        $this->container = $container;
-    }
-
-    private function getTable($tableName)
-    {
-        return $this->container->getParameter('database_table_prefix').$tableName;
-    }
-
     /**
      * @param Schema $schema
      */
@@ -35,7 +18,7 @@ class Version20161128084725 extends AbstractMigration implements ContainerAwareI
         $configTable = $schema->getTable($this->getTable('config'));
         $this->skipIf($configTable->hasColumn('list_mode'), 'It seems that you already played this migration.');
 
-        $configTable->addColumn('list_mode', 'integer');
+        $configTable->addColumn('list_mode', 'integer', ['notnull' => false]);
     }
 
     /**