Version20180320171339   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 8
c 1
b 0
f 0
dl 0
loc 16
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A down() 0 3 1
A up() 0 9 1
1
<?php
2
3
declare(strict_types=1);
4
/**
5
 * This file is part of the mailserver-admin package.
6
 * (c) Jeffrey Boehm <https://github.com/jeboehm/mailserver-admin>
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace App\Migrations;
12
13
use Doctrine\DBAL\Schema\Schema;
14
use Doctrine\Migrations\AbstractMigration;
15
use Exception;
16
17
class Version20180320171339 extends AbstractMigration
18
{
19
    public function up(Schema $schema): void
20
    {
21
        $this->abortIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), "Migration can only be executed safely on 'mysql'.");
22
23
        $this->addSql('ALTER TABLE mail_aliases RENAME INDEX idx_5f12bb39115f0ee5 TO IDX_85AF3A56115F0EE5');
24
        $this->addSql('ALTER TABLE mail_domains CHANGE name name VARCHAR(255) NOT NULL');
25
        $this->addSql('CREATE UNIQUE INDEX UNIQ_56C63EF25E237E06 ON mail_domains (name)');
26
        $this->addSql('DROP INDEX UNIQ_1483A5E95E237E06 ON mail_users');
27
        $this->addSql('ALTER TABLE mail_users RENAME INDEX idx_1483a5e9115f0ee5 TO IDX_20400786115F0EE5');
28
    }
29
30
    public function down(Schema $schema): void
31
    {
32
        throw new Exception('Not implemented');
33
    }
34
}
35