From 877787e5fe6a6545105616968939949b4db81347 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Wed, 28 Nov 2018 20:26:18 +0100 Subject: Fix utf8mb4 on vendor tables When creating the schema for test these tables use default length for string: 255. Which fail when using utf8mb4. > Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes Also move the `setKeepStaticConnections` in before and after class to avoid: > SAVEPOINT DOCTRINE2_SAVEPOINT_2 does not exist See https://github.com/dmaicher/doctrine-test-bundle#troubleshooting --- src/Wallabag/ApiBundle/Entity/AccessToken.php | 16 ++++++++++++++++ src/Wallabag/ApiBundle/Entity/AuthCode.php | 16 ++++++++++++++++ src/Wallabag/ApiBundle/Entity/RefreshToken.php | 16 ++++++++++++++++ 3 files changed, 48 insertions(+) (limited to 'src') diff --git a/src/Wallabag/ApiBundle/Entity/AccessToken.php b/src/Wallabag/ApiBundle/Entity/AccessToken.php index c09a0c80..5e4099dd 100644 --- a/src/Wallabag/ApiBundle/Entity/AccessToken.php +++ b/src/Wallabag/ApiBundle/Entity/AccessToken.php @@ -8,6 +8,22 @@ use FOS\OAuthServerBundle\Entity\AccessToken as BaseAccessToken; /** * @ORM\Table("oauth2_access_tokens") * @ORM\Entity + * @ORM\AttributeOverrides({ + * @ORM\AttributeOverride(name="token", + * column=@ORM\Column( + * name = "token", + * type = "string", + * length = 191 + * ) + * ), + * @ORM\AttributeOverride(name="scope", + * column=@ORM\Column( + * name = "scope", + * type = "string", + * length = 191 + * ) + * ) + * }) */ class AccessToken extends BaseAccessToken { diff --git a/src/Wallabag/ApiBundle/Entity/AuthCode.php b/src/Wallabag/ApiBundle/Entity/AuthCode.php index 4d4b09fe..5fa205ac 100644 --- a/src/Wallabag/ApiBundle/Entity/AuthCode.php +++ b/src/Wallabag/ApiBundle/Entity/AuthCode.php @@ -8,6 +8,22 @@ use FOS\OAuthServerBundle\Entity\AuthCode as BaseAuthCode; /** * @ORM\Table("oauth2_auth_codes") * @ORM\Entity + * @ORM\AttributeOverrides({ + * @ORM\AttributeOverride(name="token", + * column=@ORM\Column( + * name = "token", + * type = "string", + * length = 191 + * ) + * ), + * @ORM\AttributeOverride(name="scope", + * column=@ORM\Column( + * name = "scope", + * type = "string", + * length = 191 + * ) + * ) + * }) */ class AuthCode extends BaseAuthCode { diff --git a/src/Wallabag/ApiBundle/Entity/RefreshToken.php b/src/Wallabag/ApiBundle/Entity/RefreshToken.php index 822a02d8..dd8e9c63 100644 --- a/src/Wallabag/ApiBundle/Entity/RefreshToken.php +++ b/src/Wallabag/ApiBundle/Entity/RefreshToken.php @@ -8,6 +8,22 @@ use FOS\OAuthServerBundle\Entity\RefreshToken as BaseRefreshToken; /** * @ORM\Table("oauth2_refresh_tokens") * @ORM\Entity + * @ORM\AttributeOverrides({ + * @ORM\AttributeOverride(name="token", + * column=@ORM\Column( + * name = "token", + * type = "string", + * length = 191 + * ) + * ), + * @ORM\AttributeOverride(name="scope", + * column=@ORM\Column( + * name = "scope", + * type = "string", + * length = 191 + * ) + * ) + * }) */ class RefreshToken extends BaseRefreshToken { -- cgit v1.2.3