3 namespace Application\Migrations
;
5 use Doctrine\DBAL\Schema\Schema
;
6 use Wallabag\CoreBundle\Doctrine\WallabagMigration
;
9 * Added `headers` field in entry table.
11 class Version20170511115400
extends WallabagMigration
13 public function up(Schema
$schema)
15 $entryTable = $schema->getTable($this->getTable('entry'));
17 $this->skipIf($entryTable->hasColumn('headers'), 'It seems that you already played this migration.');
19 $entryTable->addColumn('headers', 'text', [
24 public function down(Schema
$schema)
26 $entryTable = $schema->getTable($this->getTable('entry'));
28 $this->skipIf(!$entryTable->hasColumn('headers'), 'It seems that you already played this migration.');
30 $entryTable->dropColumn('headers');