]> git.immae.eu Git - github/wallabag/wallabag.git/blob - app/DoctrineMigrations/Version20161128084725.php
Merge pull request #4152 from ldidry/add-env-var-dev.sh
[github/wallabag/wallabag.git] / app / DoctrineMigrations / Version20161128084725.php
1 <?php
2
3 namespace Application\Migrations;
4
5 use Doctrine\DBAL\Schema\Schema;
6 use Wallabag\CoreBundle\Doctrine\WallabagMigration;
7
8 /**
9 * Added list_mode in user config.
10 */
11 class Version20161128084725 extends WallabagMigration
12 {
13 public function up(Schema $schema)
14 {
15 $configTable = $schema->getTable($this->getTable('config'));
16 $this->skipIf($configTable->hasColumn('list_mode'), 'It seems that you already played this migration.');
17
18 $configTable->addColumn('list_mode', 'integer', ['notnull' => false]);
19 }
20
21 public function down(Schema $schema)
22 {
23 $configTable = $schema->getTable($this->getTable('config'));
24 $configTable->dropColumn('list_mode');
25 }
26 }