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

Version20171208040821::up()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 6
nc 1
nop 1
dl 0
loc 8
rs 10
c 0
b 0
f 0
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 Version20171208040821 extends AbstractMigration
13
{
14
    /**
15
     * @param Schema $schema
16
     */
17
    public function up(Schema $schema): void
18
    {
19
        $table = $schema->createTable('usage_api_timeline');
20
        $table->addColumn('id', 'integer', ['autoincrement' => true]);
21
        $table->addColumn('date', 'date');
22
        $table->addColumn('endpoint', '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_api_timeline');
33
    }
34
}
35