Version20150509200923   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
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 Facility 
10
 */
11
class Version20150509200923 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 corpFacility (ID BIGINT UNSIGNED AUTO_INCREMENT NOT NULL, ownerID BIGINT UNSIGNED NOT NULL, facilityID BIGINT UNSIGNED NOT NULL, typeID BIGINT UNSIGNED NOT NULL, typeName VARCHAR(255) NOT NULL, solarSystemID BIGINT UNSIGNED NOT NULL, solarSystemName BIGINT UNSIGNED NOT NULL, regionID BIGINT UNSIGNED NOT NULL, regionName BIGINT UNSIGNED NOT NULL, starbaseModifier INT NOT NULL, tax INT NOT NULL, INDEX owner (ownerID), UNIQUE INDEX facility_owner (facilityId, ownerId), PRIMARY KEY(ID)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;');
21
        $this->addSql("INSERT INTO api VALUES(29, 128, 'TariochEveapiFetcherEveWorker', 'corp', 'Facilities', 15);");
22
    }
23
24
    /**
25
     * @param Schema $schema
26
     */
27
    public function down(Schema $schema)
28
    {
29
    }
30
}
31