From 0717b86f5d9067ae2a306f8e425e3c29a8bf5872 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Wed, 4 Nov 2015 17:14:33 +0100 Subject: [PATCH] Change Indexes names to unique ones --- lib/Alchemy/Phrasea/Model/Entities/ApiAccount.php | 4 ++-- .../Phrasea/Model/Entities/ApiApplication.php | 2 +- lib/Alchemy/Phrasea/Model/Entities/ApiLog.php | 2 +- lib/Alchemy/Phrasea/Model/Entities/ApiOauthCode.php | 2 +- .../Phrasea/Model/Entities/ApiOauthRefreshToken.php | 2 +- lib/Alchemy/Phrasea/Model/Entities/ApiOauthToken.php | 4 ++-- .../Phrasea/Model/Entities/FtpExportElement.php | 4 ++-- lib/Alchemy/Phrasea/Model/Entities/Session.php | 2 +- lib/Alchemy/Phrasea/Model/Entities/User.php | 12 ++++++------ lib/Alchemy/Phrasea/Model/Entities/WebhookEvent.php | 2 +- 10 files changed, 18 insertions(+), 18 deletions(-) diff --git a/lib/Alchemy/Phrasea/Model/Entities/ApiAccount.php b/lib/Alchemy/Phrasea/Model/Entities/ApiAccount.php index 07c3766034..b5fa525e4d 100644 --- a/lib/Alchemy/Phrasea/Model/Entities/ApiAccount.php +++ b/lib/Alchemy/Phrasea/Model/Entities/ApiAccount.php @@ -8,8 +8,8 @@ use Gedmo\Mapping\Annotation as Gedmo; /** * @ORM\Table(name="ApiAccounts", indexes={ - * @ORM\Index(name="user_id", columns={"user_id"}), - * @ORM\Index(name="application_id", columns={"application_id"}) + * @ORM\Index(name="api_account_user_id", columns={"user_id"}), + * @ORM\Index(name="api_account_application_id", columns={"application_id"}) * }) * @ORM\Entity(repositoryClass="Alchemy\Phrasea\Model\Repositories\ApiAccountRepository") */ diff --git a/lib/Alchemy/Phrasea/Model/Entities/ApiApplication.php b/lib/Alchemy/Phrasea/Model/Entities/ApiApplication.php index c32107beab..31d6b437b0 100644 --- a/lib/Alchemy/Phrasea/Model/Entities/ApiApplication.php +++ b/lib/Alchemy/Phrasea/Model/Entities/ApiApplication.php @@ -9,7 +9,7 @@ use Gedmo\Mapping\Annotation as Gedmo; /** * @ORM\Table(name="ApiApplications", uniqueConstraints={ * @ORM\UniqueConstraint(name="client_id", columns={"client_id"})}, indexes={ - * @ORM\Index(name="creator_id", columns={"creator_id"}) + * @ORM\Index(name="api_application_creator_id", columns={"creator_id"}) * }) * @ORM\Entity(repositoryClass="Alchemy\Phrasea\Model\Repositories\ApiApplicationRepository") */ diff --git a/lib/Alchemy/Phrasea/Model/Entities/ApiLog.php b/lib/Alchemy/Phrasea/Model/Entities/ApiLog.php index 766af26370..35bbbde94a 100644 --- a/lib/Alchemy/Phrasea/Model/Entities/ApiLog.php +++ b/lib/Alchemy/Phrasea/Model/Entities/ApiLog.php @@ -6,7 +6,7 @@ use Doctrine\ORM\Mapping as ORM; use Gedmo\Mapping\Annotation as Gedmo; /** - * @ORM\Table(name="ApiLogs", indexes={@ORM\Index(name="account_id", columns={"account_id"})}) + * @ORM\Table(name="ApiLogs", indexes={@ORM\Index(name="api_log_account_id", columns={"account_id"})}) * @ORM\Entity(repositoryClass="Alchemy\Phrasea\Model\Repositories\ApiLogRepository") */ class ApiLog diff --git a/lib/Alchemy/Phrasea/Model/Entities/ApiOauthCode.php b/lib/Alchemy/Phrasea/Model/Entities/ApiOauthCode.php index 01c4620a29..4c42849987 100644 --- a/lib/Alchemy/Phrasea/Model/Entities/ApiOauthCode.php +++ b/lib/Alchemy/Phrasea/Model/Entities/ApiOauthCode.php @@ -6,7 +6,7 @@ use Doctrine\ORM\Mapping as ORM; use Gedmo\Mapping\Annotation as Gedmo; /** - * @ORM\Table(name="ApiOauthCodes", indexes={@ORM\Index(name="account_id", columns={"account_id"})}) + * @ORM\Table(name="ApiOauthCodes", indexes={@ORM\Index(name="api_oauth_code_account_id", columns={"account_id"})}) * @ORM\Entity(repositoryClass="Alchemy\Phrasea\Model\Repositories\ApiOauthCodeRepository") */ class ApiOauthCode diff --git a/lib/Alchemy/Phrasea/Model/Entities/ApiOauthRefreshToken.php b/lib/Alchemy/Phrasea/Model/Entities/ApiOauthRefreshToken.php index 2f23dd6745..da1249eb22 100644 --- a/lib/Alchemy/Phrasea/Model/Entities/ApiOauthRefreshToken.php +++ b/lib/Alchemy/Phrasea/Model/Entities/ApiOauthRefreshToken.php @@ -6,7 +6,7 @@ use Doctrine\ORM\Mapping as ORM; use Gedmo\Mapping\Annotation as Gedmo; /** - * @ORM\Table(name="ApiOauthRefreshTokens", indexes={@ORM\Index(name="account_id", columns={"account_id"})}) + * @ORM\Table(name="ApiOauthRefreshTokens", indexes={@ORM\Index(name="api_oauth_refresh_token_account_id", columns={"account_id"})}) * @ORM\Entity(repositoryClass="Alchemy\Phrasea\Model\Repositories\ApiOauthRefreshTokenRepository") */ class ApiOauthRefreshToken diff --git a/lib/Alchemy/Phrasea/Model/Entities/ApiOauthToken.php b/lib/Alchemy/Phrasea/Model/Entities/ApiOauthToken.php index 2e2823c3c8..7c912111ff 100644 --- a/lib/Alchemy/Phrasea/Model/Entities/ApiOauthToken.php +++ b/lib/Alchemy/Phrasea/Model/Entities/ApiOauthToken.php @@ -7,8 +7,8 @@ use Gedmo\Mapping\Annotation as Gedmo; /** * @ORM\Table(name="ApiOauthTokens", indexes={ - * @ORM\Index(name="account_id", columns={"account_id"}), - * @ORM\Index(name="session_id", columns={"session_id"}) + * @ORM\Index(name="api_oauth_token_account_id", columns={"account_id"}), + * @ORM\Index(name="api_oauth_token_session_id", columns={"session_id"}) * }) * @ORM\Entity(repositoryClass="Alchemy\Phrasea\Model\Repositories\ApiOauthTokenRepository") */ diff --git a/lib/Alchemy/Phrasea/Model/Entities/FtpExportElement.php b/lib/Alchemy/Phrasea/Model/Entities/FtpExportElement.php index 3300a7e28b..7fc3b4f920 100644 --- a/lib/Alchemy/Phrasea/Model/Entities/FtpExportElement.php +++ b/lib/Alchemy/Phrasea/Model/Entities/FtpExportElement.php @@ -21,8 +21,8 @@ use Gedmo\Mapping\Annotation as Gedmo; * @ORM\UniqueConstraint(name="unique_ftp_export", columns={"export_id","base_id","record_id", "subdef"}) * }, * indexes={ - * @ORM\index(name="done", columns={"done"}), - * @ORM\index(name="error", columns={"error"}) + * @ORM\index(name="ftp_export_element_done", columns={"done"}), + * @ORM\index(name="ftp_export_element_error", columns={"error"}) * } * ) * @ORM\Entity(repositoryClass="Alchemy\Phrasea\Model\Repositories\FtpExportElementRepository") diff --git a/lib/Alchemy/Phrasea/Model/Entities/Session.php b/lib/Alchemy/Phrasea/Model/Entities/Session.php index cf99655204..f6a6813506 100644 --- a/lib/Alchemy/Phrasea/Model/Entities/Session.php +++ b/lib/Alchemy/Phrasea/Model/Entities/Session.php @@ -15,7 +15,7 @@ use Doctrine\ORM\Mapping as ORM; use Gedmo\Mapping\Annotation as Gedmo; /** - * @ORM\Table(name="Sessions", indexes={@ORM\index(name="user_id", columns={"user_id"})}) + * @ORM\Table(name="Sessions", indexes={@ORM\index(name="session_user_id", columns={"user_id"})}) * @ORM\Entity(repositoryClass="Alchemy\Phrasea\Model\Repositories\SessionRepository") */ class Session diff --git a/lib/Alchemy/Phrasea/Model/Entities/User.php b/lib/Alchemy/Phrasea/Model/Entities/User.php index 26860008a4..6afbca4b50 100644 --- a/lib/Alchemy/Phrasea/Model/Entities/User.php +++ b/lib/Alchemy/Phrasea/Model/Entities/User.php @@ -24,12 +24,12 @@ use Gedmo\Mapping\Annotation as Gedmo; * @ORM\UniqueConstraint(name="login_unique",columns={"login"}) * }, * indexes={ - * @ORM\index(name="login", columns={"login"}), - * @ORM\index(name="mail", columns={"email"}), - * @ORM\index(name="model_of", columns={"model_of"}), - * @ORM\index(name="salted_password", columns={"salted_password"}), - * @ORM\index(name="admin", columns={"admin"}), - * @ORM\index(name="guest", columns={"guest"}) + * @ORM\index(name="user_login", columns={"login"}), + * @ORM\index(name="user_mail", columns={"email"}), + * @ORM\index(name="user_model_of", columns={"model_of"}), + * @ORM\index(name="user_salted_password", columns={"salted_password"}), + * @ORM\index(name="user_admin", columns={"admin"}), + * @ORM\index(name="user_guest", columns={"guest"}) * } * ) * @ORM\Entity(repositoryClass="Alchemy\Phrasea\Model\Repositories\UserRepository") diff --git a/lib/Alchemy/Phrasea/Model/Entities/WebhookEvent.php b/lib/Alchemy/Phrasea/Model/Entities/WebhookEvent.php index bcbb0f8791..d8c5f959b3 100644 --- a/lib/Alchemy/Phrasea/Model/Entities/WebhookEvent.php +++ b/lib/Alchemy/Phrasea/Model/Entities/WebhookEvent.php @@ -6,7 +6,7 @@ use Doctrine\ORM\Mapping as ORM; use Gedmo\Mapping\Annotation as Gedmo; /** - * @ORM\Table(name="WebhookEvents", indexes={@ORM\Index(name="name", columns={"name"})}) + * @ORM\Table(name="WebhookEvents", indexes={@ORM\Index(name="webhook_event_name", columns={"name"})}) * @ORM\Entity(repositoryClass="Alchemy\Phrasea\Model\Repositories\WebhookEventRepository") */ class WebhookEvent