3 namespace Application\Migrations
;
5 use Doctrine\DBAL\Schema\Schema
;
6 use Wallabag\CoreBundle\Doctrine\WallabagMigration
;
9 * Remove isPublic in Entry Table.
11 class Version20170407200919
extends WallabagMigration
14 * @param Schema $schema
16 public function up(Schema
$schema)
18 $entryTable = $schema->getTable($this->getTable('entry'));
19 $this->skipIf(!$entryTable->hasColumn('is_public'), 'It seems that you already played this migration.');
21 $entryTable->dropColumn('is_public');
25 * @param Schema $schema
27 public function down(Schema
$schema)
29 $entryTable = $schema->getTable($this->getTable('entry'));
30 $this->skipIf($entryTable->hasColumn('is_public'), 'It seems that you already played this migration.');
32 $entryTable->addColumn('is_public', 'boolean', ['notnull' => false, 'default' => 0]);