mirror of
https://github.com/wallabag/wallabag.git
synced 2024-12-31 20:08:40 +00:00
Add index on starred entries
Fixes #4079 Signed-off-by: Olivier Mehani <shtrom@ssji.net>
This commit is contained in:
parent
d1dbe10e84
commit
5071c8c9cf
2 changed files with 24 additions and 1 deletions
22
app/DoctrineMigrations/Version20190806131006.php
Normal file
22
app/DoctrineMigrations/Version20190806131006.php
Normal file
|
@ -0,0 +1,22 @@
|
|||
<?php declare(strict_types=1);
|
||||
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
/**
|
||||
* Auto-generated Migration: Please modify to your needs!
|
||||
*/
|
||||
final class Version20190806131006 extends AbstractMigration
|
||||
{
|
||||
public function up(Schema $schema) : void
|
||||
{
|
||||
$this->addSql('CREATE INDEX user_starred ON wallabag_entry (user_id, is_starred, starred_at)');
|
||||
}
|
||||
|
||||
public function down(Schema $schema) : void
|
||||
{
|
||||
$this->addSql('DROP INDEX user_starred ON `wallabag_entry`');
|
||||
}
|
||||
}
|
|
@ -29,7 +29,8 @@ use Wallabag\UserBundle\Entity\User;
|
|||
* @ORM\Index(name="uid", columns={"uid"}),
|
||||
* @ORM\Index(name="hashed_url_user_id", columns={"user_id", "hashed_url"}, options={"lengths"={null, 40}}),
|
||||
* @ORM\Index(name="hashed_given_url_user_id", columns={"user_id", "hashed_given_url"}, options={"lengths"={null, 40}}),
|
||||
* @ORM\Index(name="user_language", columns={"language", "user_id"})
|
||||
* @ORM\Index(name="user_language", columns={"language", "user_id"}),
|
||||
* @ORM\Index(name="user_starred", columns={"user_id", "is_starred", "starred_at"})
|
||||
* }
|
||||
* )
|
||||
* @ORM\HasLifecycleCallbacks()
|
||||
|
|
Loading…
Reference in a new issue