wallabag/src/Wallabag/ApiBundle/Entity/AccessToken.php
Jeremy Benoist 877787e5fe
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
2018-11-28 22:04:55 +01:00

48 lines
1 KiB
PHP

<?php
namespace Wallabag\ApiBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
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
{
/**
* @ORM\Id
* @ORM\Column(type="integer")
* @ORM\GeneratedValue(strategy="AUTO")
*/
protected $id;
/**
* @ORM\ManyToOne(targetEntity="Client", inversedBy="accessTokens")
* @ORM\JoinColumn(nullable=false)
*/
protected $client;
/**
* @ORM\ManyToOne(targetEntity="Wallabag\UserBundle\Entity\User")
*/
protected $user;
}