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
14 * @param Schema $schema
16 public function up(Schema
$schema)
18 $entryTable = $schema->getTable($this->getTable('entry'));
20 $this->skipIf($entryTable->hasColumn('headers'), 'It seems that you already played this migration.');
22 $entryTable->addColumn('headers', 'text', [
28 * @param Schema $schema
30 public function down(Schema
$schema)
32 $entryTable = $schema->getTable($this->getTable('entry'));
34 $this->skipIf(!$entryTable->hasColumn('headers'), 'It seems that you already played this migration.');
36 $entryTable->dropColumn('headers');