aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--app/DoctrineMigrations/Version20190806131006.php22
-rw-r--r--src/Wallabag/CoreBundle/Entity/Entry.php3
2 files changed, 24 insertions, 1 deletions
diff --git a/app/DoctrineMigrations/Version20190806131006.php b/app/DoctrineMigrations/Version20190806131006.php
new file mode 100644
index 00000000..7ad45b57
--- /dev/null
+++ b/app/DoctrineMigrations/Version20190806131006.php
@@ -0,0 +1,22 @@
1<?php declare(strict_types=1);
2
3namespace Application\Migrations;
4
5use Doctrine\DBAL\Schema\Schema;
6use Doctrine\Migrations\AbstractMigration;
7
8/**
9 * Auto-generated Migration: Please modify to your needs!
10 */
11final class Version20190806131006 extends AbstractMigration
12{
13 public function up(Schema $schema) : void
14 {
15 $this->addSql('CREATE INDEX user_starred ON wallabag_entry (user_id, is_starred, starred_at)');
16 }
17
18 public function down(Schema $schema) : void
19 {
20 $this->addSql('DROP INDEX user_starred ON `wallabag_entry`');
21 }
22}
diff --git a/src/Wallabag/CoreBundle/Entity/Entry.php b/src/Wallabag/CoreBundle/Entity/Entry.php
index eb185b8c..593ff01d 100644
--- a/src/Wallabag/CoreBundle/Entity/Entry.php
+++ b/src/Wallabag/CoreBundle/Entity/Entry.php
@@ -29,7 +29,8 @@ use Wallabag\UserBundle\Entity\User;
29 * @ORM\Index(name="uid", columns={"uid"}), 29 * @ORM\Index(name="uid", columns={"uid"}),
30 * @ORM\Index(name="hashed_url_user_id", columns={"user_id", "hashed_url"}, options={"lengths"={null, 40}}), 30 * @ORM\Index(name="hashed_url_user_id", columns={"user_id", "hashed_url"}, options={"lengths"={null, 40}}),
31 * @ORM\Index(name="hashed_given_url_user_id", columns={"user_id", "hashed_given_url"}, options={"lengths"={null, 40}}), 31 * @ORM\Index(name="hashed_given_url_user_id", columns={"user_id", "hashed_given_url"}, options={"lengths"={null, 40}}),
32 * @ORM\Index(name="user_language", columns={"language", "user_id"}) 32 * @ORM\Index(name="user_language", columns={"language", "user_id"}),
33 * @ORM\Index(name="user_starred", columns={"user_id", "is_starred", "starred_at"})
33 * } 34 * }
34 * ) 35 * )
35 * @ORM\HasLifecycleCallbacks() 36 * @ORM\HasLifecycleCallbacks()