mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-02 06:24:34 +02:00
Add database indices to improve performance
This commit is contained in:
parent
9d069149d7
commit
ed91ffc60a
17 changed files with 193 additions and 18 deletions
|
@ -56,7 +56,10 @@ use Symfony\Component\Validator\Constraints as Assert;
|
|||
* This entity represents an user group.
|
||||
*
|
||||
* @ORM\Entity()
|
||||
* @ORM\Table("`groups`")
|
||||
* @ORM\Table("`groups`", indexes={
|
||||
* @ORM\Index(name="name_idx", columns={"name"}),
|
||||
* @ORM\Index(name="parent_name_idx", columns={"parent_id", "name"}),
|
||||
* })
|
||||
*/
|
||||
class Group extends AbstractStructuralDBElement implements HasPermissionsInterface
|
||||
{
|
||||
|
|
|
@ -80,7 +80,9 @@ use Symfony\Component\Validator\Constraints as Assert;
|
|||
* Also this entity is able to save some informations about the user, like the names, email-address and other info.
|
||||
*
|
||||
* @ORM\Entity(repositoryClass="App\Repository\UserRepository")
|
||||
* @ORM\Table("`users`")
|
||||
* @ORM\Table("`users`", indexes={
|
||||
* @ORM\Index(name="user_idx_username", columns={"name"})
|
||||
* })
|
||||
* @ORM\EntityListeners({"App\EntityListeners\TreeCacheInvalidationListener"})
|
||||
* @UniqueEntity("name", message="validator.user.username_already_used")
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue