Skip to content

Commit 26056fc

Browse files
committed
Increase token size. OAuth
1 parent 5e9886f commit 26056fc

File tree

2 files changed

+34
-19
lines changed

2 files changed

+34
-19
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace DoctrineMigrations;
6+
7+
use Doctrine\DBAL\Schema\Schema;
8+
use Doctrine\Migrations\AbstractMigration;
9+
10+
/**
11+
* Auto-generated Migration: Please modify to your needs!
12+
*/
13+
final class Version20251223112851 extends AbstractMigration
14+
{
15+
public function getDescription(): string
16+
{
17+
return '';
18+
}
19+
20+
public function up(Schema $schema): void
21+
{
22+
// this up() migration is auto-generated, please modify it to your needs
23+
$this->addSql('ALTER TABLE fos_user DROP gplus_access_token, CHANGE google_access_token google_access_token LONGTEXT DEFAULT NULL, CHANGE facebook_access_token facebook_access_token LONGTEXT DEFAULT NULL, CHANGE apple_access_token apple_access_token LONGTEXT DEFAULT NULL');
24+
}
25+
26+
public function down(Schema $schema): void
27+
{
28+
// this down() migration is auto-generated, please modify it to your needs
29+
$this->addSql('ALTER TABLE fos_user ADD gplus_access_token VARCHAR(300) DEFAULT NULL, CHANGE google_access_token google_access_token VARCHAR(300) DEFAULT NULL, CHANGE facebook_access_token facebook_access_token VARCHAR(300) DEFAULT NULL, CHANGE apple_access_token apple_access_token VARCHAR(300) DEFAULT NULL');
30+
}
31+
}

src/DB/Entity/User/User.php

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -148,28 +148,22 @@ class User implements UserInterface, PasswordAuthenticatedUserInterface
148148
#[ORM\OneToMany(targetEntity: UserRemixSimilarityRelation::class, mappedBy: 'second_user', cascade: ['persist', 'remove'], orphanRemoval: true)]
149149
protected Collection $reverse_relations_of_similar_users_based_on_remixes;
150150

151-
/**
152-
* @deprecated
153-
*/
154-
#[ORM\Column(type: Types::STRING, length: 300, nullable: true)]
155-
protected ?string $gplus_access_token = null;
156-
157151
#[ORM\Column(type: Types::STRING, length: 300, nullable: true)]
158152
protected ?string $google_id = null;
159153

160154
#[ORM\Column(type: Types::STRING, length: 300, nullable: true)]
161155
protected ?string $facebook_id = null;
162156

163-
#[ORM\Column(type: Types::STRING, length: 300, nullable: true)]
157+
#[ORM\Column(type: Types::TEXT, nullable: true)]
164158
protected ?string $google_access_token = null;
165159

166-
#[ORM\Column(type: Types::STRING, length: 300, nullable: true)]
160+
#[ORM\Column(type: Types::TEXT, nullable: true)]
167161
protected ?string $facebook_access_token = null;
168162

169163
#[ORM\Column(type: Types::STRING, length: 300, nullable: true)]
170164
protected ?string $apple_id = null;
171165

172-
#[ORM\Column(type: Types::STRING, length: 300, nullable: true)]
166+
#[ORM\Column(type: Types::TEXT, nullable: true)]
173167
protected ?string $apple_access_token = null;
174168

175169
/**
@@ -285,16 +279,6 @@ public function getAppleId(): ?string
285279
return $this->apple_id;
286280
}
287281

288-
public function setGplusAccessToken(?string $gplus_access_token): void
289-
{
290-
$this->gplus_access_token = $gplus_access_token;
291-
}
292-
293-
public function getGplusAccessToken(): ?string
294-
{
295-
return $this->gplus_access_token;
296-
}
297-
298282
public function setGplusIdToken(?string $gplus_id_token): void
299283
{
300284
$this->gplus_id_token = $gplus_id_token;

0 commit comments

Comments
 (0)