Added given_url in entry table

- Added index on entry table for given_url field
- Fix tests:

    The previous `bit.ly` url redirected to doc.wallabag but that url doesn't exist in the fixtures.
    I used our own internal "redirector" to create a redirect to an url which exist in the fixtures.

Also, updating current migration to use the new `WallabagMigration`.
This commit is contained in:
Nicolas Lœuillet
2017-07-10 21:32:25 +02:00
committed by Jeremy Benoist
parent e9579d6de9
commit b7fa51ae7d
6 changed files with 158 additions and 2 deletions

View File

@ -368,6 +368,7 @@ class EntryRepository extends EntityRepository
{
$res = $this->createQueryBuilder('e')
->where('e.hashedUrl = :hashed_url')->setParameter('hashed_url', $hashedUrl)
// ->orWhere('e.givenUrl = :url')->setParameter('url', $url)
->andWhere('e.user = :user_id')->setParameter('user_id', $userId)
->getQuery()
->getResult();