Version20150508004812   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

Changes 4
Bugs 2 Features 0
Metric Value
wmc 2
c 4
b 2
f 0
lcom 1
cbo 3
dl 0
loc 22
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A down() 0 3 1
A up() 0 9 1
1
<?php
2
3
namespace Application\Migrations;
4
5
use Doctrine\DBAL\Migrations\AbstractMigration;
6
use Doctrine\DBAL\Schema\Schema;
7
8
/**
9
 * Add corp blueprint
10
 */
11
class Version20150508004812 extends AbstractMigration
12
{
13
    /**
14
     * @param Schema $schema
15
     */
16
    public function up(Schema $schema)
17
    {
18
        $this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on \'mysql\'.');
19
20
        $this->addSql('INSERT INTO api VALUES(28, 128, "TariochEveapiFetcherEveWorker", "corp", "IndustryJobsHistory", 360);');
21
        $this->addSql('DROP INDEX job_owner ON corpIndustryJob;');
22
        $this->addSql('ALTER TABLE corpIndustryJob ADD ownerID BIGINT UNSIGNED NOT NULL, CHANGE installerName installerName VARCHAR(255) NOT NULL, CHANGE solarSystemName solarSystemName VARCHAR(255) NOT NULL, CHANGE blueprintTypeName blueprintTypeName VARCHAR(255) NOT NULL, CHANGE productTypeName productTypeName VARCHAR(255) NOT NULL;');
23
        $this->addSql('CREATE UNIQUE INDEX job_owner ON corpIndustryJob (jobId, ownerId);');
24
    }
25
26
    /**
27
     * @param Schema $schema
28
     */
29
    public function down(Schema $schema)
30
    {
31
    }
32
}
33