]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Fix index on MySQL
authorJeremy Benoist <jeremy.benoist@gmail.com>
Mon, 1 Apr 2019 13:45:17 +0000 (15:45 +0200)
committerJeremy Benoist <jeremy.benoist@gmail.com>
Mon, 1 Apr 2019 13:45:17 +0000 (15:45 +0200)
app/DoctrineMigrations/Version20190401105353.php
src/Wallabag/CoreBundle/Entity/Entry.php

index 94ebb1ab592ea26f89bfa8437b53f48b3c428e68..d27962dbedbdd94c02e4c4c27410dddbb04c33a0 100644 (file)
@@ -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]]);
     }
 
     /**
index faf4d259801e32a20f9b222f0a509fb6db4d194a..c3fb87d218630875e77047002fad2bad55b091d1 100644 (file)
@@ -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()