3 namespace Application\Migrations
;
5 use Doctrine\DBAL\Schema\Schema
;
6 use Wallabag\CoreBundle\Doctrine\WallabagMigration
;
9 * Add updated_at fields to site_credential table.
11 final class Version20190117131816
extends WallabagMigration
13 public function up(Schema
$schema): void
15 $siteCredentialTable = $schema->getTable($this->getTable('site_credential'));
17 $this->skipIf($siteCredentialTable->hasColumn('updated_at'), 'It seems that you already played this migration.');
19 $siteCredentialTable->addColumn('updated_at', 'datetime', [
24 public function down(Schema
$schema): void
26 $siteCredentialTable = $schema->getTable($this->getTable('site_credential'));
28 $this->skipIf(!$siteCredentialTable->hasColumn('updated_at'), 'It seems that you already played this migration.');
30 $siteCredentialTable->dropColumn('updated_at');