]>
Commit | Line | Data |
---|---|---|
9f01d0fd NL |
1 | <?php |
2 | ||
3 | namespace Application\Migrations; | |
4 | ||
9f01d0fd | 5 | use Doctrine\DBAL\Schema\Schema; |
bfe7a692 | 6 | use Wallabag\CoreBundle\Doctrine\WallabagMigration; |
9f01d0fd NL |
7 | |
8 | /** | |
9aa99128 | 9 | * Added list_mode in user config. |
9f01d0fd | 10 | */ |
bfe7a692 | 11 | class Version20161128084725 extends WallabagMigration |
9f01d0fd | 12 | { |
9f01d0fd NL |
13 | public function up(Schema $schema) |
14 | { | |
15 | $configTable = $schema->getTable($this->getTable('config')); | |
9aa99128 | 16 | $this->skipIf($configTable->hasColumn('list_mode'), 'It seems that you already played this migration.'); |
9f01d0fd | 17 | |
24879db1 | 18 | $configTable->addColumn('list_mode', 'integer', ['notnull' => false]); |
9f01d0fd NL |
19 | } |
20 | ||
9f01d0fd NL |
21 | public function down(Schema $schema) |
22 | { | |
23 | $configTable = $schema->getTable($this->getTable('config')); | |
9aa99128 | 24 | $configTable->dropColumn('list_mode'); |
9f01d0fd NL |
25 | } |
26 | } |