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