3 namespace Application\Migrations
;
5 use Doctrine\DBAL\Schema\Schema
;
6 use Wallabag\CoreBundle\Doctrine\WallabagMigration
;
9 * Add http_status in `entry_table`.
11 class Version20161118134328
extends WallabagMigration
14 * @param Schema $schema
16 public function up(Schema
$schema)
18 $entryTable = $schema->getTable($this->getTable('entry'));
20 $this->skipIf($entryTable->hasColumn('http_status'), 'It seems that you already played this migration.');
22 $entryTable->addColumn('http_status', 'string', [
29 * @param Schema $schema
31 public function down(Schema
$schema)
33 $entryTable = $schema->getTable($this->getTable('entry'));
35 $this->skipIf(!$entryTable->hasColumn('http_status'), 'It seems that you already played this migration.');
37 $entryTable->dropColumn('http_status');