From 5cc0646e66f52448f83a7a458e0b60b4580e83e5 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Mon, 1 Apr 2019 15:45:17 +0200 Subject: [PATCH] Fix index on MySQL --- app/DoctrineMigrations/Version20190401105353.php | 2 +- src/Wallabag/CoreBundle/Entity/Entry.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/DoctrineMigrations/Version20190401105353.php b/app/DoctrineMigrations/Version20190401105353.php index 94ebb1ab..d27962db 100644 --- a/app/DoctrineMigrations/Version20190401105353.php +++ b/app/DoctrineMigrations/Version20190401105353.php @@ -24,7 +24,7 @@ class Version20190401105353 extends WallabagMigration 'notnull' => false, ]); - $entryTable->addIndex(['user_id', 'hashed_url'], 'hashed_url_user_id'); + $entryTable->addIndex(['user_id', 'hashed_url'], 'hashed_url_user_id', [], ['lengths' => [null, 40]]); } /** diff --git a/src/Wallabag/CoreBundle/Entity/Entry.php b/src/Wallabag/CoreBundle/Entity/Entry.php index faf4d259..c3fb87d2 100644 --- a/src/Wallabag/CoreBundle/Entity/Entry.php +++ b/src/Wallabag/CoreBundle/Entity/Entry.php @@ -26,7 +26,7 @@ use Wallabag\UserBundle\Entity\User; * indexes={ * @ORM\Index(name="created_at", columns={"created_at"}), * @ORM\Index(name="uid", columns={"uid"}), - * @ORM\Index(name="hashed_url_user_id", columns={"user_id", "hashed_url"}) + * @ORM\Index(name="hashed_url_user_id", columns={"user_id", "hashed_url"}, options={"lengths"={null, 40}}) * } * ) * @ORM\HasLifecycleCallbacks() -- 2.41.0