Test Setup Failed
Branch main (b06171)
by Jenny
25:39 queued 21:46
created

Version20251026215938   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A down() 0 4 1
A getDescription() 0 3 1
A up() 0 16 1
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 Version20251026215938 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(<<<'SQL'
24
            CREATE TEMPORARY TABLE __temp__descriptions AS SELECT id, indicator, series_description, source FROM descriptions
25
        SQL);
26
        $this->addSql(<<<'SQL'
27
            DROP TABLE descriptions
28
        SQL);
29
        $this->addSql(<<<'SQL'
30
            CREATE TABLE descriptions (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, indicator VARCHAR(255) NOT NULL, series_description VARCHAR(255) NOT NULL, source VARCHAR(255) NOT NULL)
31
        SQL);
32
        $this->addSql(<<<'SQL'
33
            INSERT INTO descriptions (id, indicator, series_description, source) SELECT id, indicator, series_description, source FROM __temp__descriptions
34
        SQL);
35
        $this->addSql(<<<'SQL'
36
            DROP TABLE __temp__descriptions
37
        SQL);
38
    }
39
40
    public function down(Schema $schema): void
41
    {
42
        // this down() migration is auto-generated, please modify it to your needs
43
        $this->addSql(<<<'SQL'
44
            ALTER TABLE descriptions ADD COLUMN target CLOB DEFAULT NULL
45
        SQL);
46
    }
47
}
48