Improved performance of comment searching

This commit is contained in:
Marcin Kurczewski 2014-11-06 19:52:40 +01:00
parent 4578f7a7a4
commit a55bd7686c
2 changed files with 13 additions and 0 deletions

View file

@ -0,0 +1,12 @@
<?php
namespace Szurubooru\Upgrades;
use Szurubooru\DatabaseConnection;
class Upgrade28 implements IUpgrade
{
public function run(DatabaseConnection $databaseConnection)
{
$pdo = $databaseConnection->getPDO();
$pdo->exec('CREATE INDEX idx_comments_postId ON comments(postId)');
}
}

View file

@ -43,6 +43,7 @@ return [
$container->get(\Szurubooru\Upgrades\Upgrade25::class), $container->get(\Szurubooru\Upgrades\Upgrade25::class),
$container->get(\Szurubooru\Upgrades\Upgrade26::class), $container->get(\Szurubooru\Upgrades\Upgrade26::class),
$container->get(\Szurubooru\Upgrades\Upgrade27::class), $container->get(\Szurubooru\Upgrades\Upgrade27::class),
$container->get(\Szurubooru\Upgrades\Upgrade28::class),
]; ];
}), }),