Passed
Pull Request — main (#441)
by Hubert
09:04
created

Version20170623205224   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 8
dl 0
loc 21
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A up() 0 8 1
A down() 0 3 1
1
<?php
2
declare(strict_types = 1);
3
4
namespace Application\Migrations;
5
6
use Doctrine\DBAL\Schema\Schema;
7
use Doctrine\Migrations\AbstractMigration;
8
9
/**
10
 * Auto-generated Migration: Please modify to your needs!
11
 */
12
class Version20170623205224 extends AbstractMigration
13
{
14
    /**
15
     * @param Schema $schema
16
     */
17
    public function up(Schema $schema): void
18
    {
19
        $table = $schema->createTable('usage_projects');
20
        $table->addColumn('id', 'integer', ['autoincrement' => true]);
21
        $table->addColumn('tool', 'string');
22
        $table->addColumn('project', 'string');
23
        $table->addColumn('count', 'integer');
24
        $table->setPrimaryKey(['id']);
25
    }
26
27
    /**
28
     * @param Schema $schema
29
     */
30
    public function down(Schema $schema): void
31
    {
32
        $schema->dropTable('usage_projects');
33
    }
34
}
35