aboutsummaryrefslogtreecommitdiffhomepage
path: root/app/DoctrineMigrations/Version20170710125843.php
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2019-05-29 14:18:04 +0200
committerJeremy Benoist <jeremy.benoist@gmail.com>2019-05-29 15:56:20 +0200
commitf3bfb875e94021a93e24a41fbc0f8d86d4dee378 (patch)
tree34f7efd0f3dc5326f68364e2fb2544619518c371 /app/DoctrineMigrations/Version20170710125843.php
parentb7fa51ae7dd5fef2d9459100c88479413ddd3fb3 (diff)
downloadwallabag-f3bfb875e94021a93e24a41fbc0f8d86d4dee378.tar.gz
wallabag-f3bfb875e94021a93e24a41fbc0f8d86d4dee378.tar.zst
wallabag-f3bfb875e94021a93e24a41fbc0f8d86d4dee378.zip
Use hash given url to avoid duplicate
Using hashed url we can ensure an index on them to ensure it's fast.
Diffstat (limited to 'app/DoctrineMigrations/Version20170710125843.php')
-rw-r--r--app/DoctrineMigrations/Version20170710125843.php38
1 files changed, 0 insertions, 38 deletions
diff --git a/app/DoctrineMigrations/Version20170710125843.php b/app/DoctrineMigrations/Version20170710125843.php
deleted file mode 100644
index 2cf8647a..00000000
--- a/app/DoctrineMigrations/Version20170710125843.php
+++ /dev/null
@@ -1,38 +0,0 @@
1<?php
2
3namespace Application\Migrations;
4
5use Doctrine\DBAL\Schema\Schema;
6use Wallabag\CoreBundle\Doctrine\WallabagMigration;
7
8/**
9 * Added `given_url` field in entry table.
10 */
11class Version20170710125843 extends WallabagMigration
12{
13 /**
14 * @param Schema $schema
15 */
16 public function up(Schema $schema)
17 {
18 $entryTable = $schema->getTable($this->getTable('entry'));
19
20 $this->skipIf($entryTable->hasColumn('given_url'), 'It seems that you already played this migration.');
21
22 $entryTable->addColumn('given_url', 'text', [
23 'notnull' => false,
24 ]);
25 }
26
27 /**
28 * @param Schema $schema
29 */
30 public function down(Schema $schema)
31 {
32 $entryTable = $schema->getTable($this->getTable('entry'));
33
34 $this->skipIf(!$entryTable->hasColumn('given_url'), 'It seems that you already played this migration.');
35
36 $entryTable->dropColumn('given_url');
37 }
38}