forked from wallabag/wallabag
Add index on starred entries
Fixes #4079 Signed-off-by: Olivier Mehani <shtrom@ssji.net>
This commit is contained in:
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`');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user