6
6
7
7
namespace Chamilo \CoreBundle \Migrations \Schema \V200 ;
8
8
9
- use Chamilo \CoreBundle \Entity \PortfolioAttachment ;
9
+ use Chamilo \CoreBundle \Entity \Portfolio ;
10
10
use Chamilo \CoreBundle \Migrations \AbstractMigrationChamilo ;
11
11
use Chamilo \CoreBundle \Repository \Node \PortfolioCommentRepository ;
12
12
use Chamilo \CoreBundle \Repository \Node \PortfolioRepository ;
13
- use Chamilo \CoreBundle \Repository \PortfolioAttachmentRepository ;
14
13
use Doctrine \DBAL \Schema \Schema ;
15
14
16
15
class Version20250927180004 extends AbstractMigrationChamilo
@@ -22,9 +21,6 @@ public function getDescription(): string
22
21
23
22
public function up (Schema $ schema ): void
24
23
{
25
- /** @var PortfolioAttachmentRepository $attachmentRepo */
26
- $ attachmentRepo = $ this ->container ->get (PortfolioAttachmentRepository::class);
27
-
28
24
/** @var PortfolioRepository $itemRepo */
29
25
$ itemRepo = $ this ->container ->get (PortfolioRepository::class);
30
26
@@ -41,7 +37,7 @@ public function up(Schema $schema): void
41
37
$ resource = null ;
42
38
$ resourceRepo = null ;
43
39
44
- if (PortfolioAttachment ::TYPE_ITEM === (int ) $ attachmentRow ['origin_type ' ]) {
40
+ if (Portfolio ::TYPE_ITEM === (int ) $ attachmentRow ['origin_type ' ]) {
45
41
$ resourceRepo = $ itemRepo ;
46
42
$ resource = $ itemRepo ->find ($ attachmentRow ['origin_id ' ]);
47
43
@@ -51,7 +47,7 @@ public function up(Schema $schema): void
51
47
;
52
48
53
49
$ userId = $ itemRow ['user_id ' ] ?? 0 ;
54
- } elseif (PortfolioAttachment ::TYPE_COMMENT === (int ) $ attachmentRow ['origin_type ' ]) {
50
+ } elseif (Portfolio ::TYPE_COMMENT === (int ) $ attachmentRow ['origin_type ' ]) {
55
51
$ resourceRepo = $ commentRepo ;
56
52
$ resource = $ commentRepo ->find ($ attachmentRow ['origin_id ' ]);
57
53
0 commit comments