aboutsummaryrefslogtreecommitdiffhomepage
path: root/app/DoctrineMigrations/Version20190117131816.php
diff options
context:
space:
mode:
authorJérémy Benoist <j0k3r@users.noreply.github.com>2019-01-18 15:56:39 +0100
committerGitHub <noreply@github.com>2019-01-18 15:56:39 +0100
commit6bfbf16eeb0004fcac6d2d2507e3d7d8b4dc3c1f (patch)
treeb4f38bf4a01580f5f7218440e7054688d7178e53 /app/DoctrineMigrations/Version20190117131816.php
parent8445ad4790ff4f3f9759f9bfa0d503ad5654e30e (diff)
parent1e0d8ad7b728f6fb2cd886526b0fb84ef803e84f (diff)
downloadwallabag-6bfbf16eeb0004fcac6d2d2507e3d7d8b4dc3c1f.tar.gz
wallabag-6bfbf16eeb0004fcac6d2d2507e3d7d8b4dc3c1f.tar.zst
wallabag-6bfbf16eeb0004fcac6d2d2507e3d7d8b4dc3c1f.zip
Merge pull request #3859 from wallabag/phpstan
Enable PHPStan
Diffstat (limited to 'app/DoctrineMigrations/Version20190117131816.php')
-rw-r--r--app/DoctrineMigrations/Version20190117131816.php32
1 files changed, 32 insertions, 0 deletions
diff --git a/app/DoctrineMigrations/Version20190117131816.php b/app/DoctrineMigrations/Version20190117131816.php
new file mode 100644
index 00000000..6548b9fa
--- /dev/null
+++ b/app/DoctrineMigrations/Version20190117131816.php
@@ -0,0 +1,32 @@
1<?php
2
3namespace Application\Migrations;
4
5use Doctrine\DBAL\Schema\Schema;
6use Wallabag\CoreBundle\Doctrine\WallabagMigration;
7
8/**
9 * Add updated_at fields to site_credential table.
10 */
11final class Version20190117131816 extends WallabagMigration
12{
13 public function up(Schema $schema): void
14 {
15 $siteCredentialTable = $schema->getTable($this->getTable('site_credential'));
16
17 $this->skipIf($siteCredentialTable->hasColumn('updated_at'), 'It seems that you already played this migration.');
18
19 $siteCredentialTable->addColumn('updated_at', 'datetime', [
20 'notnull' => false,
21 ]);
22 }
23
24 public function down(Schema $schema): void
25 {
26 $siteCredentialTable = $schema->getTable($this->getTable('site_credential'));
27
28 $this->skipIf(!$siteCredentialTable->hasColumn('updated_at'), 'It seems that you already played this migration.');
29
30 $siteCredentialTable->dropColumn('updated_at');
31 }
32}