Passed
Pull Request — main (#443)
by MusikAnimal
13:59 queued 09:36
created

Version20170623203059   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
3
declare(strict_types = 1);
4
5
namespace DoctrineMigrations;
6
7
use Doctrine\DBAL\Schema\Schema;
8
use Doctrine\Migrations\AbstractMigration;
9
10
/**
11
 * Auto-generated Migration: Please modify to your needs!
12
 */
13
final class Version20170623203059 extends AbstractMigration
14
{
15
    /**
16
     * @param Schema $schema
17
     */
18
    public function up(Schema $schema): void
19
    {
20
        $table = $schema->createTable('usage_timeline');
21
        $table->addColumn('id', 'integer', ['autoincrement' => true]);
22
        $table->addColumn('date', 'date');
23
        $table->addColumn('tool', 'string');
24
        $table->addColumn('count', 'integer');
25
        $table->setPrimaryKey(['id']);
26
    }
27
28
    /**
29
     * @param Schema $schema
30
     */
31
    public function down(Schema $schema): void
32
    {
33
        $schema->dropTable('usage_timeline');
34
    }
35
}
36