3 namespace Application\Migrations
;
5 use Doctrine\DBAL\Schema\Schema
;
6 use Wallabag\CoreBundle\Doctrine\WallabagMigration
;
9 * Added action_mark_as_read field on config table.
11 class Version20161106113822
extends WallabagMigration
14 * @param Schema $schema
16 public function up(Schema
$schema)
18 $configTable = $schema->getTable($this->getTable('config'));
20 $this->skipIf($configTable->hasColumn('action_mark_as_read'), 'It seems that you already played this migration.');
22 $configTable->addColumn('action_mark_as_read', 'integer', [
29 * @param Schema $schema
31 public function down(Schema
$schema)
33 $configTable = $schema->getTable($this->getTable('config'));
35 $this->skipIf(!$configTable->hasColumn('action_mark_as_read'), 'It seems that you already played this migration.');
37 $configTable->dropColumn('action_mark_as_read');