From d1dbe10e8460b7117c98ee1e02735602887fd3a4 Mon Sep 17 00:00:00 2001 From: Olivier Mehani Date: Mon, 5 Aug 2019 23:29:55 +1000 Subject: Update language in Entry model, and add index Fixes #4080 Signed-off-by: Olivier Mehani --- src/Wallabag/CoreBundle/Entity/Entry.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/Wallabag/CoreBundle') diff --git a/src/Wallabag/CoreBundle/Entity/Entry.php b/src/Wallabag/CoreBundle/Entity/Entry.php index 4d5e6fc9..eb185b8c 100644 --- a/src/Wallabag/CoreBundle/Entity/Entry.php +++ b/src/Wallabag/CoreBundle/Entity/Entry.php @@ -28,7 +28,8 @@ use Wallabag\UserBundle\Entity\User; * @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"}, options={"lengths"={null, 40}}), - * @ORM\Index(name="hashed_given_url_user_id", columns={"user_id", "hashed_given_url"}, options={"lengths"={null, 40}}) + * @ORM\Index(name="hashed_given_url_user_id", columns={"user_id", "hashed_given_url"}, options={"lengths"={null, 40}}), + * @ORM\Index(name="user_language", columns={"language", "user_id"}) * } * ) * @ORM\HasLifecycleCallbacks() @@ -221,7 +222,7 @@ class Entry /** * @var string * - * @ORM\Column(name="language", type="text", nullable=true) + * @ORM\Column(name="language", type="string", length=20, nullable=true) * * @Groups({"entries_for_user", "export_all"}) */ -- cgit v1.2.3 From 5071c8c9cf4d3fcb79851e3ea089593c81cd3b02 Mon Sep 17 00:00:00 2001 From: Olivier Mehani Date: Tue, 6 Aug 2019 22:39:12 +1000 Subject: Add index on starred entries Fixes #4079 Signed-off-by: Olivier Mehani --- src/Wallabag/CoreBundle/Entity/Entry.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/Wallabag/CoreBundle') diff --git a/src/Wallabag/CoreBundle/Entity/Entry.php b/src/Wallabag/CoreBundle/Entity/Entry.php index eb185b8c..593ff01d 100644 --- a/src/Wallabag/CoreBundle/Entity/Entry.php +++ b/src/Wallabag/CoreBundle/Entity/Entry.php @@ -29,7 +29,8 @@ use Wallabag\UserBundle\Entity\User; * @ORM\Index(name="uid", columns={"uid"}), * @ORM\Index(name="hashed_url_user_id", columns={"user_id", "hashed_url"}, options={"lengths"={null, 40}}), * @ORM\Index(name="hashed_given_url_user_id", columns={"user_id", "hashed_given_url"}, options={"lengths"={null, 40}}), - * @ORM\Index(name="user_language", columns={"language", "user_id"}) + * @ORM\Index(name="user_language", columns={"language", "user_id"}), + * @ORM\Index(name="user_starred", columns={"user_id", "is_starred", "starred_at"}) * } * ) * @ORM\HasLifecycleCallbacks() -- cgit v1.2.3 From 588de419e043bc1d8876552809607721cb256094 Mon Sep 17 00:00:00 2001 From: Olivier Mehani Date: Wed, 7 Aug 2019 21:44:00 +1000 Subject: Add user_archived index Signed-off-by: Olivier Mehani --- src/Wallabag/CoreBundle/Entity/Entry.php | 1 + 1 file changed, 1 insertion(+) (limited to 'src/Wallabag/CoreBundle') diff --git a/src/Wallabag/CoreBundle/Entity/Entry.php b/src/Wallabag/CoreBundle/Entity/Entry.php index 593ff01d..49f19cfa 100644 --- a/src/Wallabag/CoreBundle/Entity/Entry.php +++ b/src/Wallabag/CoreBundle/Entity/Entry.php @@ -30,6 +30,7 @@ use Wallabag\UserBundle\Entity\User; * @ORM\Index(name="hashed_url_user_id", columns={"user_id", "hashed_url"}, options={"lengths"={null, 40}}), * @ORM\Index(name="hashed_given_url_user_id", columns={"user_id", "hashed_given_url"}, options={"lengths"={null, 40}}), * @ORM\Index(name="user_language", columns={"language", "user_id"}), + * @ORM\Index(name="user_archived", columns={"user_id", "is_archived", "archived_at"}), * @ORM\Index(name="user_starred", columns={"user_id", "is_starred", "starred_at"}) * } * ) -- cgit v1.2.3 From 2b0f4e86b27fec39f5e172fbeba9ce033aef2e79 Mon Sep 17 00:00:00 2001 From: Olivier Mehani Date: Wed, 7 Aug 2019 22:02:37 +1000 Subject: Add user_created index Signed-off-by: Olivier Mehani --- src/Wallabag/CoreBundle/Entity/Entry.php | 1 + 1 file changed, 1 insertion(+) (limited to 'src/Wallabag/CoreBundle') diff --git a/src/Wallabag/CoreBundle/Entity/Entry.php b/src/Wallabag/CoreBundle/Entity/Entry.php index 49f19cfa..4acec261 100644 --- a/src/Wallabag/CoreBundle/Entity/Entry.php +++ b/src/Wallabag/CoreBundle/Entity/Entry.php @@ -31,6 +31,7 @@ use Wallabag\UserBundle\Entity\User; * @ORM\Index(name="hashed_given_url_user_id", columns={"user_id", "hashed_given_url"}, options={"lengths"={null, 40}}), * @ORM\Index(name="user_language", columns={"language", "user_id"}), * @ORM\Index(name="user_archived", columns={"user_id", "is_archived", "archived_at"}), + * @ORM\Index(name="user_created", columns={"user_id", "created_at"}), * @ORM\Index(name="user_starred", columns={"user_id", "is_starred", "starred_at"}) * } * ) -- cgit v1.2.3 From 0810c75e0bd2aa008d69da819a7c51207f159854 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Thu, 8 Aug 2019 09:36:03 +0200 Subject: Add `tag_label` & `config_feed_token` index --- src/Wallabag/CoreBundle/Entity/Config.php | 7 ++++++- src/Wallabag/CoreBundle/Entity/Tag.php | 3 +++ 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'src/Wallabag/CoreBundle') diff --git a/src/Wallabag/CoreBundle/Entity/Config.php b/src/Wallabag/CoreBundle/Entity/Config.php index c6e65d66..5181d91d 100644 --- a/src/Wallabag/CoreBundle/Entity/Config.php +++ b/src/Wallabag/CoreBundle/Entity/Config.php @@ -11,7 +11,12 @@ use Wallabag\UserBundle\Entity\User; * Config. * * @ORM\Entity(repositoryClass="Wallabag\CoreBundle\Repository\ConfigRepository") - * @ORM\Table(name="`config`") + * @ORM\Table( + * name="`config`", + * indexes={ + * @ORM\Index(name="config_feed_token", columns={"feed_token"}, options={"lengths"={255}}), + * } + * ) * @ORM\Entity */ class Config diff --git a/src/Wallabag/CoreBundle/Entity/Tag.php b/src/Wallabag/CoreBundle/Entity/Tag.php index 95c47bbd..3ccb20a5 100644 --- a/src/Wallabag/CoreBundle/Entity/Tag.php +++ b/src/Wallabag/CoreBundle/Entity/Tag.php @@ -16,6 +16,9 @@ use JMS\Serializer\Annotation\XmlRoot; * @ORM\Table( * name="`tag`", * options={"collate"="utf8mb4_bin", "charset"="utf8mb4"}, + * indexes={ + * @ORM\Index(name="tag_label", columns={"label"}, options={"lengths"={255}}), + * } * ) * @ORM\Entity(repositoryClass="Wallabag\CoreBundle\Repository\TagRepository") * @ExclusionPolicy("all") -- cgit v1.2.3