Version20150501203943   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A down() 0 3 1
A up() 0 7 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 Version20150501203943 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('CREATE TABLE corpBlueprint (ID BIGINT UNSIGNED AUTO_INCREMENT NOT NULL, ownerID BIGINT UNSIGNED NOT NULL, itemID BIGINT UNSIGNED NOT NULL, locationID BIGINT UNSIGNED NOT NULL, typeID BIGINT UNSIGNED NOT NULL, typeName VARCHAR(255) NOT NULL, quantity BIGINT NOT NULL, flag INT NOT NULL, timeEfficiency INT UNSIGNED NOT NULL, materialEfficiency INT UNSIGNED NOT NULL, runs INT NOT NULL, INDEX owner (ownerID), UNIQUE INDEX entry_owner (itemId, ownerId), PRIMARY KEY(ID)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;');
21
        $this->addSql('INSERT INTO api VALUES(27, 2, "TariochEveapiFetcherEveWorker", "corp", "Blueprints", 1440);');
22
    }
23
24
    /**
25
     * @param Schema $schema
26
     */
27
    public function down(Schema $schema)
28
    {
29
    }
30
}
31