Passed
Pull Request — master (#5928)
by Angel Fernando Quiroz
10:22
created

Version20241113110000   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 18
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getDescription() 0 3 1
A up() 0 3 1
A down() 0 3 1
1
<?php
2
3
/* For licensing terms, see /license.txt */
4
5
declare(strict_types=1);
6
7
namespace Chamilo\CoreBundle\Migrations\Schema\V200;
8
9
use Chamilo\CoreBundle\Migrations\AbstractMigrationChamilo;
10
use Doctrine\DBAL\Schema\Schema;
11
12
final class Version20241113110000 extends AbstractMigrationChamilo
13
{
14
    public function getDescription(): string
15
    {
16
        return 'Add fulltext index to messages';
17
    }
18
19
    /**
20
     * @inheritDoc
21
     */
22
    public function up(Schema $schema): void
23
    {
24
        $this->addSql('CREATE FULLTEXT INDEX idx_message_search ON message (title, content)');
25
    }
26
27
    public function down(Schema $schema): void
28
    {
29
        $this->addSql('DROP INDEX idx_message_search ON message');
30
    }
31
}
32